-
Notifications
You must be signed in to change notification settings - Fork 0
What's New in the Spring Framework
This page provides information pertaining to new features and changes in various versions of the Spring Framework.
For assistance with migrating to a newer version of the Spring Framework, consult the Migrating from earlier versions of the Spring Framework wiki page.
Table of Contents
- What's New in Spring Framework 5.x
- What's New in Spring Framework 4.x
- What's New in Spring Framework 3.x
- Entire framework codebase based on Java 8 source code level now.
- Improved readability through inferred generics etc.
- Conditional support for Java 8 features now in straight code.
- Java EE 7 API level required in Spring's corresponding modules now.
- Servlet 3.1, JMS 2.0, JPA 2.1, Bean Validation 1.1
- Recent servers: e.g. Tomcat 8.5+, Jetty 9.3+, WildFly 10+
- Full compatibility with JDK 9 as of July 2016.
- Project spring-framework can be built on JDK 9; test suite passes.
- Package
mock.staticmock
removed fromspring-aspects
module.- No support for
AnnotationDrivenStaticEntityMockingControl
anymore.
- No support for
- Packages
web.view.tiles2
andorm.hibernate3/hibernate4
dropped.- Minimum requirement: Tiles 3 and Hibernate 5 now.
- Dropped support: Portlet, Velocity, JasperReports, XMLBeans, JDO, Guava.
- Recommendation: Stay on Spring Framework 4.3.x for those if needed.
- Many deprecated classes and methods removed across the codebase.
- A few compromises made for commonly used methods in the ecosystem.
- JDK 8+ enhancements
- Efficient method parameter access based on Java 8 reflection enhancements.
- Selective declarations of Java 8 default methods in core Spring interfaces.
- Consistent use of JDK 7
Charset
andStandardCharsets
enhancements.
- JDK 9 preparations
- Consistent instantiation via constructors (with revised exception handling)
- XML configuration namespaces streamlined towards unversioned schemas.
- Always resolved against latest
xsd
files; no support for deprecated features. - Version-specific declarations still supported but validated against latest schema.
- Always resolved against latest
-
Resource
abstraction providesisFile
indicator for defensivegetFile
access.
- Unified support for media type resolution through
MediaTypeFactory
delegate. - Full Servlet 3.1 signature support in Spring-provided
Filter
implementations. - Support for Protobuf 3.0 (currently beta 4).
-
spring-core
DataBuffer
andEncoder
/Decoder
abstractions with non-blocking semantics. -
spring-web
HTTP message codec implementations with JSON (Jackson) and XML (JAXB) support. - New
spring-web-reactive
module with reactive support for the@Controller
programming model adapting Reactive Streams to Servlet 3.1 containers as well as non-Servlet runtimes such as Netty and Undertow. - New
WebClient
with reactive support on the client side. - For more details refer to the chapter "Web Reactive Framework" in the reference docs.
- Complete support for JUnit 5's Jupiter programming and
extension models in the Spring TestContext Framework.
-
SpringExtension
: an implementation of multiple extension APIs from JUnit Jupiter that provides full support for the existing feature set of the Spring TestContext Framework. This support is enabled via@ExtendWith(SpringExtension.class)
. -
@SpringJUnitConfig
: a composed annotation that combines@ExtendWith(SpringExtension.class)
from JUnit Jupiter with@ContextConfiguration
from the Spring TestContext Framework. -
@SpringJUnitWebConfig
: a composed annotation that combines@ExtendWith(SpringExtension.class)
from JUnit Jupiter with@ContextConfiguration
and@WebAppConfiguration
from the Spring TestContext Framework.
-
- Support for parallel test execution in the Spring TestContext Framework. See the Parallel test execution section of the Testing chapter for details.
- New before and after test execution callbacks in the Spring TestContext Framework
with support for TestNG, JUnit 5, and JUnit 4 via the
SpringRunner
(but not via JUnit 4 rules).- New
beforeTestExecution()
andafterTestExecution()
callbacks in theTestExecutionListener
API andTestContextManager
.
- New
- XMLUnit support upgraded to 2.2
The "What's New" guide for Spring Framework 4.x is available in the Spring Framework 4.3.x reference manual.
The "What's New" guide for Spring Framework 3.x is available in the Spring Framework 3.2.x reference manual.
What's New in the Spring Framework
Building a distribution with dependencies
Migrating from earlier versions of the Spring Framework
Migrating to Spring Framework 5.x
Migrating to Spring Framework 4.x
Migrating to Spring Framework 3.x
Manually merging pull requests