Go to file
Sam Brannen 30db2e4fb5
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
Support Bean Overrides for non-singletons
Prior to this commit, the BeanOverrideBeanFactoryPostProcessor rejected
any attempt to override a non-singleton bean; however, due to interest
from the community, we have decided to provide support for overriding
non-singleton beans via the Bean Override mechanism — for example, when
using @⁠MockitoBean, @⁠MockitoSpyBean, and @⁠TestBean.

With this commit, we now support Bean Overrides for non-singletons: for
standard JVM runtimes as well as AOT processing and AOT runtimes. This
commit also documents that non-singletons will effectively be converted
to singletons when overridden and logs a warning similar to the
following.

WARN: BeanOverrideBeanFactoryPostProcessor - Converting 'prototype' scoped bean definition 'myBean' to a singleton.

See gh-33602
See gh-32933
See gh-33800
Closes gh-35574
2025-10-07 15:33:18 +02:00
.github Upgrade CI workflow from Java 24 to Java 25 2025-10-02 10:19:42 +02:00
.idea Add a project icon for IntelliJ IDEA 2025-02-19 13:45:16 +01:00
buildSrc Upgrade the build to Java 25 2025-09-23 15:57:21 +02:00
framework-api Upgrade the build to Java 25 2025-09-23 15:57:21 +02:00
framework-bom Guard against new Spring modules in ApiDiff task 2022-07-28 10:51:53 +02:00
framework-docs Support Bean Overrides for non-singletons 2025-10-07 15:33:18 +02:00
framework-platform Upgrade to Jackson 3.0.0 2025-10-05 15:17:59 +02:00
gradle Upgrade the build to Java 25 2025-09-23 15:57:21 +02:00
integration-tests Update copyright headers in source files 2025-06-17 16:23:50 +02:00
spring-aop Merge branch '6.2.x' 2025-10-01 19:26:06 +02:00
spring-aspects Update copyright headers in source files 2025-06-17 16:23:50 +02:00
spring-beans Merge branch '6.2.x' 2025-10-06 14:10:05 +02:00
spring-context Merge branch '6.2.x' 2025-10-06 14:10:05 +02:00
spring-context-indexer Update copyright headers in source files 2025-06-17 16:23:50 +02:00
spring-context-support Refine SingletonSupplier<T> static methods nullability 2025-10-01 11:38:33 +02:00
spring-core Merge branch '6.2.x' 2025-10-02 21:56:12 +02:00
spring-core-test Upgrade to JUnit 6.0 RC3 2025-09-23 16:19:54 +02:00
spring-expression Test SpEL Map access/indexing support for nonexistent keys 2025-10-04 17:43:47 +02:00
spring-instrument Update copyright headers in source files 2025-06-17 16:23:50 +02:00
spring-jdbc Merge branch '6.2.x' 2025-10-03 14:54:04 +02:00
spring-jms Introduce SimpleDestinationResolver as new default for common setups 2025-10-02 18:28:59 +02:00
spring-messaging Use uppercase for classpath-related static final field names 2025-09-22 18:32:14 +02:00
spring-orm Use uppercase for classpath-related static final field names 2025-09-22 18:32:14 +02:00
spring-oxm Update copyright headers in source files 2025-06-17 16:23:50 +02:00
spring-r2dbc Nullability fixes for AtomicReference variables 2025-09-25 07:39:44 +02:00
spring-test Support Bean Overrides for non-singletons 2025-10-07 15:33:18 +02:00
spring-tx Revert nullability changes in reactive transaction support 2025-10-02 12:47:37 +02:00
spring-web Introduce findAnnotatedBeans(ListableBeanFactory) in ControllerAdviceBean 2025-10-07 12:37:07 +02:00
spring-webflux Fix typos 2025-10-01 11:53:01 +02:00
spring-webmvc Fix typos 2025-10-01 11:53:01 +02:00
spring-websocket Polishing contribution 2025-09-26 17:44:42 +01:00
src Merge branch '6.2.x' 2025-09-25 17:55:22 +02:00
.editorconfig Add EditorConfig 2017-06-12 08:07:54 +02:00
.gitattributes Ensure line endings for binary files are not modified in Git 2019-10-18 11:56:18 +02:00
.gitignore Merge branch '6.2.x' 2025-02-19 13:45:35 +01:00
.sdkmanrc Upgrade the build to Java 25 2025-09-23 15:57:21 +02:00
CONTRIBUTING.md Update CONTRIBUTING guidelines for DCO 2025-01-07 09:55:36 +01:00
LICENSE.txt Add LICENSE.txt file 2019-08-20 22:01:12 +02:00
README.md Fix link to code of conduct 2024-10-08 14:03:54 +02:00
SECURITY.md Update SECURITY.md 2024-10-15 17:13:29 +01:00
build.gradle Stop using javadoc.io for external Javadoc links 2025-10-02 14:24:09 +02:00
gradle.properties Upgrade to Kotlin 2.2.20 2025-09-10 14:03:30 +02:00
gradlew Upgrade to Gradle 9.1 2025-09-19 17:40:32 +02:00
gradlew.bat Upgrade to Gradle 9.1 2025-09-19 17:40:32 +02:00
import-into-eclipse.md Remove Groovy from "Eclipse/STS Project Import Guide" 2022-01-21 11:27:09 +01:00
import-into-idea.md Fix links in Javadoc and reference docs 2022-09-14 17:00:11 +02:00
settings.gradle Merge branch '6.2.x' 2025-06-06 18:21:24 +02:00

README.md

Spring Framework Build Status Revved up by Develocity

This is the home of the Spring Framework: the foundation for all Spring projects. Collectively the Spring Framework and the family of Spring projects are often referred to simply as "Spring".

Spring provides everything required beyond the Java programming language for creating enterprise applications for a wide range of scenarios and architectures. Please read the Overview section of the reference documentation for a more complete introduction.

Code of Conduct

This project is governed by the Spring Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to spring-code-of-conduct@spring.io.

Access to Binaries

For access to artifacts or a distribution zip, see the Spring Framework Artifacts wiki page.

Documentation

The Spring Framework maintains reference documentation (published and source), GitHub wiki pages, and an API reference. There are also guides and tutorials across Spring projects.

Micro-Benchmarks

See the Micro-Benchmarks wiki page.

Build from Source

See the Build from Source wiki page and the CONTRIBUTING.md file.

Continuous Integration Builds

Information regarding CI builds can be found in the Spring Framework Concourse pipeline documentation.

Stay in Touch

Follow @SpringCentral, @SpringFramework, and its team members on 𝕏. In-depth articles can be found at The Spring Blog, and releases are announced via our releases feed.

License

The Spring Framework is released under version 2.0 of the Apache License.