New in Spring 5. Project migration to Spring 5
- Tutorial
Hello! I continue a series of migrations to new versions of frameworks.
Last time, it was JUnit 5 in 10 minutes. , this time will be Spring 5.
When they talk about the new in Spring 5, they mostly start talking about the jet stack, dropping quite a lot of the new that appeared in it besides it. There are very few reactive drivers to the databases, so my video review about the other important updates, I hope, will be relevant for most Spring users. In addition, along with Spring 5.x, all its dependencies are updated: spring-data 2.x, spring-security 5.x. In January of this year, our Spring 5 / JPA Enterprise (Topjava) training project migrated from Spring 4.3.x to Spring 5. The process was fairly easy and at the end of a small video for 10 minutes I will also give all the changes in the project code.
In September of this year, Spring 5.1 is already coming out, keep up with theprogress of releases.
Thanks for attention!
Last time, it was JUnit 5 in 10 minutes. , this time will be Spring 5.
When they talk about the new in Spring 5, they mostly start talking about the jet stack, dropping quite a lot of the new that appeared in it besides it. There are very few reactive drivers to the databases, so my video review about the other important updates, I hope, will be relevant for most Spring users. In addition, along with Spring 5.x, all its dependencies are updated: spring-data 2.x, spring-security 5.x. In January of this year, our Spring 5 / JPA Enterprise (Topjava) training project migrated from Spring 4.3.x to Spring 5. The process was fairly easy and at the end of a small video for 10 minutes I will also give all the changes in the project code.
New in Spring 5
- Used JDK 8+ (Optional, CompletableFuture, Time API, java.util.function, default methods)
- Java 9 support (Automatic-Module-Name in 5.0, module-info in 6.0+ , ASM 6)
- Support HTTP / 2 ( TLS , Push ), NIO / NIO.2, Kotlin
Other changes
- Null-safety annotations (
@Nullable
), new documentation - Component index at compilation time (alternative to classpath scanning)
- Compatibility with Java EE 8 (Servlet 4.0, Bean Validation 2.0, JPA 2.2 , JSON Binding API 1.0)
- New common logging bridge -
spring-jcl
- JUnit 5 + Testing Improvements support (conditional and concurrent)
- Removed support: Portlet, Velocity, JasperReports, XMLBeans, JDO, Guava
- Null-safety annotations (
- Spring-Data-JPA 2.x, Spring-Security 5.x
- Reactive ( Web on Reactive Stack )
Resources
- The State of Java in 2018 , Java in 2017 Survey
- Spring Framework Wiki
- Spring Framework 5.0 on JDK 8 & 9 - Juergen Hoeller
Reactivity
- Spring 5 uses Reactor 3
- Reactor 3 project
- Difference between RxJava and Java API 9 Flow API
- Web on Reactive Stack
- Spring WebFlux Example
- New in Spring 5: Functional Web Framework
TopJava Migration
In September of this year, Spring 5.1 is already coming out, keep up with the
Thanks for attention!