313-frameworks-spring-boot-local-testing

313-frameworks-spring-boot-local-testing is a cursor rule for Cursor from jabrena/cursor-rules-spring-boot. It costs 0 tokens per session (2,686 once invoked), scanned A, original, Apache-2.0.

A set of guidelines for testing Spring Boot applications locally with Docker Compose, a tool that starts related services such as databases, message queues, and caches in containers.

In plain words
What is it for?
Use it to define Compose services, connect them to Spring profiles, configure integration tests, manage dynamic connection details, check service health, and prepare test data.
Why use it?
It reduces manual setup and helps developers test against consistent external services. The guidance also addresses startup speed, profiles, health checks, and test isolation.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/jabrena/cursor-rules-spring-boot/313-frameworks-spring-boot-local-testing
Clone the repo
git clone --depth 1 https://github.com/jabrena/cursor-rules-spring-boot

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 313-frameworks-spring-boot-local-testing

README.md
[![agentmods](https://agentmods.dev/badge/rules/jabrena/cursor-rules-spring-boot/313-frameworks-spring-boot-local-testing.svg)](https://agentmods.dev/rules/jabrena/cursor-rules-spring-boot/313-frameworks-spring-boot-local-testing)
Your own site
<a href="https://agentmods.dev/rules/jabrena/cursor-rules-spring-boot/313-frameworks-spring-boot-local-testing"><img src="https://agentmods.dev/badge/rules/jabrena/cursor-rules-spring-boot/313-frameworks-spring-boot-local-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,686 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02686
Opus 5 $0.00000 $0.01343
Sonnet 5 $0.00000 $0.00537
Haiku 4.5 $0.00000 $0.00269

Measured 3d ago against content hash 8e857bb9cb45, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

313-frameworks-spring-boot-local-testing scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health || exit 1"]
.cursor/rules/313-frameworks-spring-boot-local-testing.mdc · 477 lines

How it starts

The opening of the file, as written. The whole thing — 477 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Spring Boot Local Testing with Docker Compose

Best practices for local testing in Spring Boot applications using spring-boot-docker-compose for seamless integration with external services like databases, message queues, and caches.

Implementing These Principles

These guidelines are built upon the following core principles:

  • Seamless Integration: Use spring-boot-docker-compose to automatically manage external service dependencies
  • Environment Parity: Maintain consistency between local development and production environments
  • Test Isolation: Ensure tests are independent and can run in any order without side effects
  • Performance Optimization: Minimize container startup time and resource usage for faster development cycles
  • Configuration Management: Use profiles and dynamic properties for flexible environment-specific configurations

Table of contents

  • Rule 1: Dependency Configuration
  • Rule 2: Docker Compose Service Definition
  • Rule 3: Application Profile Configuration
  • Rule 4: Integration Test Setup
  • Rule 5: Service Connection Management
  • Rule 6: Health Check Implementation
  • Rule 7: Test Data Management
  • Rule 8: Performance Optimization

Rule 1: Dependency Configuration

Title: Proper Spring Boot Docker Compose Dependency Setup Description: Configure the spring-boot-docker-compose dependency correctly for runtime-only usage to automatically manage Docker services during application startup.

Good example:

<!-- Maven -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-docker-compose</artifactId>
    <scope>runtime</scope>
</dependency>

<!-- Testcontainers for integration tests -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-testcontainers</artifactId>
    <scope>test</scope>
</dependency>

Bad Example:

<!-- Don't include as compile dependency -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-docker-compose</artifactId>
    <scope>compile</scope>
</dependency>

<!-- Missing testcontainers dependency -->

Read the full file on GitHub · 477 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 477 lines · 0 tokens per session scan A 8e857bb9cb45

Subscribe to this mod's changes

313-frameworks-spring-boot-local-testing is a cursor rule published in the GitHub repository jabrena/cursor-rules-spring-boot (47 stars, last pushed 5mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,686 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.