What to put in an AGENTS.md for Spring Boot
Most Spring Boot code agents learned is 3.x, and Boot 4 breaks it: starters are split into modules, Jackson 3 moves packages, and test annotations were removed. State the Boot version and build tool.
By Himanshu Singh · Updated · How we score →
Which commands should it list?
mvn spring-boot:runorgradle bootRun; runs exploded, as in the IDEmvn spring-boot:test-runorgradle bootTestRun: the test main, with dev services
Write them as your repo runs them, with its package manager and flags, plus how to run one test.
What layout should it explain?
- Maven or Gradle, and whether the wrapper (
./mvnw,./gradlew) is checked in. - Whether
src/testhas a test main that starts dev services withSpringApplication.from(…). application.propertiesorapplication.yaml, and which profiles exist.
What do agents get wrong?
- Boot 4 needs Java 17+ and Jakarta EE 11;
spring-boot-starter-webis deprecated forspring-boot-starter-webmvc. - Jackson 3: import
tools.jackson.*(annotations stay incom.fasterxml.jackson.annotation), and@JsonComponentis now@JacksonComponent. @MockBeanand@SpyBeanwere removed for@MockitoBeanand@MockitoSpyBean;@SpringBootTestno longer sets up MockMvc without@AutoConfigureMockMvc.- Put
@ServiceConnectionon a Testcontainers field instead of writing connection properties by hand.
From the official docs: github.com/Spring-Boot-4.0-Migration-Guide (new tab) · docs.spring.io/system-requirements.html (new tab) · docs.spring.io/running-your-application.html (new tab) · docs.spring.io/dev-services.html (new tab) · docs.spring.io/testcontainers.html (new tab). The rest of the file is the same for any project: what goes in an AGENTS.md.
Spring Boot repos with an AGENTS.md or CLAUDE.md (4)
Built on Spring Boot; 4 pass the AGENTS.md check in full.
| Repo | File | Length | Stars | Language | Score |
|---|---|---|---|---|---|
| halo-dev/ | AGENTS.md | 2,056 chars | 40.4k ★ | Java | 82.7 |
| alibaba/ | AGENTS.md | 23,656 chars | 33.5k ★ | Java | 84.5 |
| conductor-oss/ | AGENTS.md | 9,485 chars | 32.5k ★ | Java | 80.0 |
| apolloconfig/ | AGENTS.md | 4,100 chars | 29.8k ★ | Java | 81.8 |
By language: Java AGENTS.md examples · Kotlin AGENTS.md examples
More examples: Next.js · React · FastAPI · Flutter · Android · .NET · Rails · Vue · Laravel · Django · Angular · React Native · iOS · all examples