spring-framework
AGENTS.md60k starsChanged 2 years agoApache-2.0View on GitHub
Concise extract of CONTRIBUTING.md, which remains the reference for humans.
We split this AGENTS.md into the rules it gives an agent
12 rules. About 0 are common, 2 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Run ./gradlew :<module>:check before finishing: it runs tests and Checkstyle (src/checkstyle/checkstyle.xml), which enforces most of the …
- Very specific: line 11
Do not run clean unless needed.
- Very specific: line 22
Import order, groups separated by a blank line: java.*, then javax.* + jakarta.*, then others, then org.springframework.*, then static …
- Very specific: line 23
No wildcard imports. No static imports in production code except constants/enum constants and third-party DSL factory methods.
- Very specific: line 24
Every source file: Apache 2.0 license header (Copyright 2002-present the original author or authors., copy from an existing file), package, …
- Very specific: line 25
Always reference fields with this., never methods.
- Distinctive: line 35
No blank line between method description and tags.
- Very specific: line 36
Add @since to new classes and new public/protected methods.
- Distinctive: line 41
Add or update tests for any code change.
- Very specific: line 43
Test class names end with Tests.
- Very specific: line 44
Use the standard Mockito API (when(...).thenReturn(...)), not BDDMockito (given(...)), in new test code.
- Very specific: line 55
Never write annotations verbatim in commit messages or PR titles (it mentions GitHub users): enclose them in backticks, as in
@Override.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Spring Framework agent guidelines
Concise extract of CONTRIBUTING.md, which remains the reference for humans.
Build
- Gradle build, JDK from
.sdkmanrc(currently JDK 25,sdk env install/sdk env); artifacts target Java 17+. - Scope builds to the modules you touched:
./gradlew :spring-webmvc:test, a single test with--tests <fully.qualified.ClassTests>. - Run
./gradlew :<module>:checkbefore finishing: it runs tests and Checkstyle (src/checkstyle/checkstyle.xml), which enforces most of the code style below. - NullAway null-safety checks run during compilation; fix reported errors instead of suppressing them.
- Do not run
cleanunless needed; the build is incremental and cached. - Reference docs:
./gradlew antora, output inframework-docs/build/site/index.html.
Code style
- Match surrounding code; do not reformat unrelated code; a file should look like it was written by a single author.
- Tabs, LF, UTF-8, no trailing whitespace.
- Aim for 90 characters per line for code (105 acceptable, 120 max) and ~80 for Javadoc.
- Wrap lines after separators (
,+?:&&||), never before. - K&R braces, with
else,catch, andfinallyon a new line. - Two blank lines before fields, constructors,
static {}blocks, and inner classes; one blank line after a multiline method signature. - Import order, groups separated by a blank line:
java.*, thenjavax.*+jakarta.*, then others, thenorg.springframework.*, then static imports. - No wildcard imports. No static imports in production code except constants/enum constants and third-party DSL factory methods; use them in tests (e.g.
assertThat). - Every source file: Apache 2.0 license header (
Copyright 2002-present the original author or authors., copy from an existing file), package, imports, exactly one top-level class. - Always reference fields with
this., never methods. Always add@Override. - No
varin production code. No single-character variable names. Wrap ternaries in parentheses with the non-null condition first:(foo != null ? foo : "default"). - Argument checks:
Assert.notNull(event, "Event must not be null"); state checks:Assert.state(...). - Null-safety with JSpecify: packages are
@NullMarkedinpackage-info.java, useorg.jspecify.annotations.Nullableexplicitly (e.g.private @Nullable String name;), repeat super method nullness on overrides,@Contractwhere useful. - Static utility classes:
abstract,Utilssuffix, private constructor. - No
System.out/System.errorprintStackTrace().
Javadoc
- First sentence in imperative style ("Return", not "Returns");
<p>to start extra paragraphs;{@code}for code andnull. - No blank line between method description and tags; do not indent wrapped tag descriptions.
- Add
@sinceto new classes and new public/protected methods; omit a.0patch version (@since 7.1, not7.1.0). - Tag order for types:
@author,@since,@param,@see,@deprecated; for members:@param,@return,@throws,@since,@see,@deprecated.
Tests
- Add or update tests for any code change.
- JUnit Jupiter, AssertJ (including
assertThatIllegalArgumentException()and similar), Mockito. No JUnit 4/Jupiter/TestNG assertions, no Hamcrest. - Test class names end with
Tests. - Use the standard Mockito API (
when(...).thenReturn(...)), notBDDMockito(given(...)), in new test code; do not migrate existingBDDMockitousage.
Docs
- Reference docs are AsciiDoc in
framework-docs/modules/ROOT; code snippets forinclude-code::live inframework-docs/src/main/{java,kotlin}.
Commits and pull requests
- Pull requests target
main. - Subject: imperative, capitalized verb, at most 55 characters, no
fix:/docs:prefixes, no issue/PR number, no trailing period. - Body wrapped at 72 characters explaining the motivation, followed by
Closes gh-123(orSee gh-123), then aSigned-off-by: Name <email>trailer (DCO, usegit commit -s). - Never write annotations verbatim in commit messages or PR titles (it mentions GitHub users): enclose them in backticks, as in
`@Override`. - Changes must be reviewed by a human who remains accountable for them before being submitted.
Trending
Quiet since August.about the whole repository
Who's talking about spring-projects/spring-framework
- Java Brains“Spring Framework 7 is released! 5 things you should learn NOW!”YouTube · Nov 17, 2025 · 36k views
- Alex Gutjahr“How To Log Incoming HTTP Requests with Spring Boot 3”YouTube · Oct 9, 2023 · 2.3k views
- Ram N Java“Mastering ApplicationContext Interface Methods in Spring | IoC Container | Spring Tutorial”YouTube · Apr 25, 2018 · 1.6k views
- クロノITチャンネル“16年ぶりの新HTTPメソッド!HTTP QUERY爆誕!エンジニアなら必ず押さえておく新知識”YouTube · Jul 9, 2026 · 1.4k views
- Ram N Java“Mastering BeanFactory Interface Methods in Spring | IoC Container | Spring Tutorial”YouTube · Apr 25, 2018 · 1.2k views
The biggest 5 of 88 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 88
Talked about on GitHub, Stack Overflow, YouTube, Hacker News, Bluesky and the web (88 times).
On GitHub · 32
- Jul 29, 2020Spring 5.3/Spring Boot 2.4 support — springfox/springfox53 reactions · 101 comments
- May 11, 2018TODO : Reactive/Webflux support — jhipster/generator-jhipster34 reactions · 36 comments
- Nov 25, 2024Spring framework 6.2 placeholder parser rewrite breaks the secret manager prefix sm:// — GoogleCloudPlatform/spring-cloud-gcp28 reactions · 24 comments
- Aug 13, 2025Introduce method contracts — jspecify/jspecify26 reactions · 33 comments
- Feb 10, 2022Deprecate WebSecurityConfigurerAdapter — spring-projects/spring-security22 reactions · 40 comments
27 more on GitHub
- Jan 16, 2025Render global errors as Problem Details — spring-projects/spring-boot19 reactions · 15 comments
- Feb 2, 2022Aspectj dumps ajcore.txt files when applying allure-gradle plugin in project with spring-boot — allure-framework/allure-gradle19 reactions · 14 comments
- Aug 24, 2021[BUG] [kotlin-spring] in reactive mode Flow<String> is not the same as Mono<List<String>> — OpenAPITools/openapi-generator16 reactions · 4 comments
- Oct 11, 2019Improve response message on DecodingException — spring-projects/spring-boot13 reactions · 11 comments
- May 2, 2023GH-8076 ConcurrentWeakHashSet — zio/zio7 reactions · 15 comments
- Oct 12, 2023feat: remove hungarian casing for interface — flitto/eslint-config-flitto-typescript4 reactions · 1 comment
- Mar 30, 2024GH-3020: Create topology before kafka streams start. — spring-projects/spring-kafka3 reactions · 7 comments
- Jun 9, 2026Bump spring.version from 7.0.7 to 7.0.8 — ahmedmoselhi/phoenicis2 reactions · 2 comments
- Jun 8, 2026Bump the maven group across 4 directories with 28 updates — STARTAQ1/sakai2 reactions · 3 comments
- May 20, 2026Bump the maven group across 15 directories with 21 updates — abrahem79/glowroot2 reactions · 1 comment
- May 20, 2026Bump the maven group across 16 directories with 21 updates — abrahem79/glowroot2 reactions · 1 comment
- May 20, 2026Bump the maven group across 4 directories with 27 updates — STARTAQ1/sakai2 reactions · 2 comments
- May 19, 2026Bump the maven group across 17 directories with 22 updates — abrahem79/glowroot2 reactions · 1 comment
- May 18, 2026Bump the maven group across 18 directories with 22 updates — abrahem79/glowroot2 reactions · 1 comment
- May 18, 2026Bump the maven group across 4 directories with 31 updates — STARTAQ1/sakai2 reactions · 1 comment
- May 14, 2026build(deps): bump the maven group across 3 directories with 3 updates — canstralian/TelegramBots2 reactions · 2 comments
- May 14, 2026Bump the maven group across 2 directories with 2 updates — GlacierEQ/nem2 reactions · 3 comments
- May 8, 2026Bump org.springframework:spring-webmvc from 4.0.5.RELEASE to 6.2.18 in /samples/Maven POM/filenames — Dustin4444/linguist2 reactions · 3 comments
- Apr 24, 2026Bump the maven group across 19 directories with 24 updates — abrahem79/glowroot2 reactions · 2 comments
- Apr 24, 2026Bump the maven group across 18 directories with 24 updates — abrahem79/glowroot2 reactions · 2 comments
- Apr 17, 2026Bump spring.version from 7.0.6 to 7.0.7 — ahmedmoselhi/phoenicis2 reactions · 1 comment
- Apr 1, 2026build(deps): bump org.springframework:spring-webmvc from 6.2.9 to 6.2.17 in /sdks/community/java/servers/spring — cicero-im/ag-ui2 reactions · 3 comments
- Jan 29, 2026Bump the maven group across 2 directories with 6 updates — GlacierEQ/nem2 reactions · 4 comments
- May 1, 2024Add an explicit module info via moditect — javatuples/javatuples2 reactions
- Nov 28, 2023Add parameters parameter to compiler — PlaytikaOSS/testcontainers-spring-boot2 reactions
- Nov 26, 2022[JAVA] [WebClient] Handle list of String special case in WebClient generator — OpenAPITools/openapi-generator2 reactions · 5 comments
- Apr 18, 2019URL parameters in GET request would not ge properly url-encoded — swagger-api/swagger-codegen2 reactions · 4 comments
On Stack Overflow · 30
- May 2, 2013Spring MVC @PathVariable with dot (.) is getting truncated396 votes · 18 answers
- Feb 25, 2015Spring MVC Controllers Unit Test not calling @ControllerAdvice153 votes
- May 29, 2014Spring MVC @PathVariable with dot (.) is getting truncated98 votes
- Sep 12, 2016JSON Web Token (JWT) with Spring based SockJS / STOMP Web Socket73 votes
- Apr 17, 2020When to set proxyBeanMethods to false in Springs @Configuration?48 votes · 2 answers
25 more on Stack Overflow
- May 27, 2017Why did Spring framework deprecate the use of Guava cache?46 votes
- Sep 21, 2016add multiple cross origin urls in spring boot39 votes
- Sep 3, 2019what is the difference between ResponseEntity<Mono> and Mono<ResponseEntity> as a return type of a rest controller33 votes · 2 answers
- Jul 9, 2019PrematureCloseException: Connection prematurely closed28 votes · 2 answers
- Aug 23, 2018Getting Ambiguous @ExceptionHandler method mapped for MethodArgumentNotValidException while startup of spring boot application27 votes
- Jun 12, 2018How do I upgrade the Spring version in Spring Boot26 votes · 2 answers
- Feb 19, 2023What minimal Spring Boot 2.x version can run for sure on Java 17?23 votes
- Feb 17, 2023CommonsMultipartFile cannot be resolved to a type23 votes
- Dec 9, 2018java.net.HttpRetryException: cannot retry due to server authentication, in streaming mode23 votes
- Jun 15, 2018Spring Cloud @SqsListener MessageConversionException: Cannot convert from [java.lang.String] for GenericMessage22 votes · 2 answers
- Sep 12, 2019Combining @PathVariable and @RequestBody20 votes · 3 answers
- Aug 29, 2017How to use "Functional bean definition Kotlin DSL" with Spring Boot and Spring WebFlux?20 votes · 4 answers
- May 16, 2012Spring expression language (SpEL): parse String to int18 votes
- Mar 13, 2019Spring MVC Annotated Controller Interface with @PathVariable17 votes
- Aug 10, 2016Spring Cancel @Async Task17 votes · 1 answer
- Aug 2, 2015spring4.2.1, hibernate5 integrate abstract method error17 votes · 3 answers
- Dec 17, 2015How to test DeferredResult timeoutResult16 votes · 2 answers
- Jan 7, 2022@TestPropertySource with dynamic properties15 votes
- Apr 1, 2019Spring Dependency Injection into JPA entity listener15 votes
- Apr 5, 2019Http Post request with content type application/x-www-form-urlencoded not working in Spring14 votes
- Jul 6, 2018Spring boot tests - Can't find test properties14 votes
- Jun 30, 2016Why Velocity support is deprecated in Spring 4.3?14 votes
- May 11, 2014Spring does not ignore file extension14 votes
- Dec 15, 2020Cors enabled in Spring Boot with Angular, still cors errors12 votes
- Nov 29, 2023Does the new RestClient introduced in Spring Framework 6.1 have a variant suitable for testing like RestTemplate had with TestRestTemplate?says it tested it11 votes · 2 answers
On YouTube · 20
- Nov 17, 2025Spring Framework 7 is released! 5 things you should learn NOW! — Java Brains36k views · 73 comments
- Oct 9, 2023How To Log Incoming HTTP Requests with Spring Boot 3 — Alex Gutjahr2.3k views · 9 comments
- Apr 25, 2018Mastering ApplicationContext Interface Methods in Spring | IoC Container | Spring Tutorial — Ram N Java1.6k views
- Jul 9, 202616年ぶりの新HTTPメソッド!HTTP QUERY爆誕!エンジニアなら必ず押さえておく新知識 — クロノITチャンネル1.4k views · 3 comments
- Apr 25, 2018Mastering BeanFactory Interface Methods in Spring | IoC Container | Spring Tutorial — Ram N Java1.2k views · 2 comments
15 more on YouTube
- Apr 26, 2018How to Use FileSystemXmlApplicationContext for Spring Configuration? | Spring Tutorial — Ram N Java958 views · 1 comment
- Dec 7, 2022Java On Conference 2022, JDK 19, Spring Framework 6 and Spring Boot 3 [MJC News #11] — MJC895 views · 6 comments
- Jun 4, 2023#12 Nouveautés Spring Boot 3 — Java Thinked633 views · 1 comment
- Feb 16, 2023Episode 102. Oh my... Spring Boot 3 is out! An interview with Dan Vega from the Pivotal Team! — The Pub House Network625 views · 1 comment
- Feb 3, 20264- Spring Framework Full Course [Arabic] - Why Spring and Spring History — Ahmed Salah612 views · 9 comments
- Jun 25, 2023#13 Mes conseils pour une migration réussie vers Java 17 et Spring Boot 3 — Java Thinked381 views · 1 comment
- Dec 20, 2025Spring Framework 7 Released! Top 7 Major Features Explained with Real Industry Use Cases — Dip Developer227 views
- Jan 9, 2020Ep 5 - Maven Dependencies|Java — Blended Software222 views · 5 comments
- Jul 19, 2022OffHeap 75. Hey, how about that new Job Offer? — The Pub House Network183 views
- Mar 2, 2021Spring Tutorial 2021: Spring And Spring Boot Versions & Spring Initializr Tutorial — GoKoders99 views · 1 comment
- Jul 10, 2026First New HTTP Method in 16 Years! HTTP QUERY Arrives — Every Engineer Needs to Know This — Chrono IT Channel19 views
- Aug 1, 2026Spring Bean Lifecycle: @PostConstruct Is Step 2, The Proxy Is Step 4 — BeansAndBedrock16 views
- Nov 18, 2024【关于Spring的两三事】打包并使用属于你自己的Spring源码 — 闲宇非鱼16 views
- Oct 14, 2019Spring: The successful path to an open source project with creator Juergen Hoeller — Pure Performance11 views
- Nov 5, 2025Spring: The successful path to an open source project with creator Juergen Hoeller — Pure Performance2 views
On Hacker News · 4
- Aug 16, 2023Spring 6.1 now compatible with virtual threads and JDK 21154 points · 127 comments
- Nov 16, 2022Spring Framework 6.x released2 points
- Dec 19, 2021Spring Framework 6.0 M1 Released1 point
- Sep 28, 2017What's New in the Spring Framework1 point
On Bluesky · 1
- May 8, 2024github.com/spring-proje... まずどこから読んでいいかがわかちゃないようになってるかちゃ — @haruo31.bsky.social0 likes and reposts · 1 reply
On the web · 1
- Aug 26, 2021Spring Framework Artifacts — google.com
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

