What are the new features are added in spring latest version?

-->

1. Spring 3.2 features

  • Spring MVC Test Framework
  • Asynchronous MVC processing on Servlet 3.0
  • custom @Bean definition annotations in @Configuration classes
  • @Autowired and @Value to be used as meta-annotations
  • Concurrency refinements across the framework
  • loading WebApplicationContexts in the TestContext framework
  • JCache 0.5 (JSR-107)

2. Spring 4.0 features

  • Removed Deprecated Packages and Methods
  • Java 8 Support
  • Java EE 6 and 7
    • Java EE version 6 or above is now considered the baseline for Spring Framework 4, with the JPA 2.0 and Servlet 3.0 specifications being of particular relevance. It is possible to run your application in Servlet 2.5, but it is recommended to use Servlet 3.0 environment.
  • Groovy Bean Definition DSL
    • With Spring Framework 4.0 it is now possible to define external bean configuration using a Groovy DSL.
  • Core Container Improvements
    • Spring now treats generic types as a form of qualifier when injecting Beans. For example, if you are using a Spring Data Repository you can now easily inject a specific implementation: @Autowired Repository<Customer> customerRepository.
    • If you use Spring’s meta-annotation support, you can now develop custom annotations that expose specific attributes from the source annotation.
    • Beans can now be Ordered when they are autowired intolists and arrays. Both the @Ordered annotation and Ordered interface are supported.
    • The @Lazy annotation can now be used on injection points, as well as @Bean definitions.
    • The @Description annotation has been added for developers using Java-based configuration.
    • A generalized model for conditionally filtering beans has been added via the @Conditional annotation. This is similar to @Profile but allows for user-defined strategies to be developed.
    • CGLIB-based proxy classes no longer require a default constructor. Support is provided via the objenesis library which is repackaged inline and distributed as part of the Spring Framework. With this strategy, no constructor at all is being invoked for proxy instances anymore.
    • There is managed time zone support across the framework now, e.g. on LocaleContext.
    • General Web Improvements
      • You can use the new @RestController annotation with Spring MVC applications, removing the need to add @ResponseBody to each of your @RequestMapping methods.
      • The AsyncRestTemplate class has been added, allowing non-blocking asynchronous support when developing REST clients.
      • Spring now offers comprehensive timezone support when developing Spring MVC applications.
    • WebSocket, SockJS, and STOMP Messaging
    • Testing Improvements

3. Spring 5.0 features

  • JDK baseline update
  • Core framework revision
  • Core container updates
  • Functional programming with Kotlin
  • Reactive Programming Model
  • Testing improvements
  • Library support
  • Discontinued support