Since the introduction of the Spring TestContext Framework in 2007, application contexts have always been stored in the context cache in a "running" state. However, leaving a context running means that components in the context may continue to run in the background. For example, JMS listeners may continue to consume messages from a queue; scheduled tasks may continue to perform active work, etc.; and this can lead to issues within a test suite. To address such issues, this commit introduces built-in support for pausing application contexts when they are not in use and restarting them if they are needed again. Specifically, the TestContextManager now marks a test's application context as "unused" after execution of the test class has ended, and the underlying ContextCache then "stops" the application context if no other test class is currently using the context. When a TestExecutionListener later attempts to obtain a paused application context -- for example, for a subsequent test class that shares the same application context -- the ContextCache ensures that context is restarted before returning it. See https://github.com/spring-projects/spring-boot/issues/28312 See gh-35171 Closes gh-35168
Spring Framework

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.