In this article we are discussing about the new features and enhancements of the Spring Framework 4. Spring Framework 4 is the major release of the framework since 2009. New release supports Java 8 Lambda expression, new Date and Time API and the parameter name discovery. Spring 4 is fully supporting Java 8 and the Java EE 7 platform.
This version of Spring Framework (Spring 4) is the major release which is fully supporting the Java 8. Spring 4 can still be used with the older version of the Java but the minimum Java requirement is Java SE 6. In this version of Spring framework many deprecated classes and methods has been removed.
The Spring framework 4 is also upgraded to provide the supporting for the latest framework such as Hibernate ORM, Quartz framewokr, and EhCache caching solution. This release of Spring framework is supporting the development of ever growing enterprise applications.
Spring Framework 4 is the major release since 2009 as it is now re-invented to support the development of Big Data, Cloud and REST applications to meet the requirement of current applications. It is also supports Micro Service Architecture which allows the developers to develop light weight services. Spring 4 also supports all the latest JVM based innovations.
Here are the new Features of Spring 4
Java 8 Support
Spring 4 Framework is fully supporting the new features of Java 8. Spring 4 supports Lambda expression, new date & time API and Java 8 based parameter name discovery. Now Java 6 is the minimum requirement of JDK to run the Spring 4 based applications. Ideally you should use the Java 8 for the development of Spring 4 based application.
Secure REST stack
Now you can secure REST stack with the help of Spring 4 security stack. You can also secure Web app and Spring MVC based applications. Spring 4 security stack integrates seamlessly with REST, Spring Social, Web applications, MVC applications.
Full support for HTML5/WebSocket
Spring 4 framework fully supports HTML5 and WebSockets, with the help you Spring 4 framework you can develop applications using the features of WebSocket specifications. You can develop applications which will include the following features:
Annotation Driven programming model
Spring 4 framework supports latest annotation driven programming model which helps the developers to develop application using Custom composable annotations, annotation scoping /overriding model and the Spring expression language support.
Full support of Java EE 7 specification
Spring 4 framework fully supports Java EE 7 Specification and you can use the following features main features in your application:
Removal of Deprecated Methods and Packages
Many deprecated API's has been removed in the Spring 4 framework. So, you should use the new API in your Spring 4 based applications. Here is the list of removed packages in Spring 4:
Here is the list of added package in Spring 4:
Here is the list of changed packages in Spring 4:
Groovy DSL bean definition support
Now in Spring 4 you can use the Groovy DSL bean configuration as an alternate to configure the bean definition.
Changes in the Spring Core
Following are the changes done in the Spring Core:
Features of Spring Web module
Here are the features of Spring 4 Web modules:
Testing of application
Many new features are added to the Spring 4 framework for unit and integration testing of the applications. Which helps the developers to write better and bug free code.
Liked it! Share this Tutorial