📜 ⬆️ ⬇️

Five things to know about the Spring Framework 5

This week, right after the release of Java 9 , a new major version of one of the most popular Java application development frameworks has been released - the Spring Framework version 5 . Under the cut the details and a brief description of what has changed.


Java 9 support


As expected, the new Spring feels quite comfortable working on the new version of Java. This means that the new version of Spring will work both included in the classpath and in the module path (using automatic modules ). The build and all the tests of the framework itself work on the new JDK9 (although by default they still use JDK8).


Reactivity


The new version of the framework adds a new project to the Spring box - the Spring Reactive Web Framework or WebFlux . This is a fully authronic and non-blocking web framework designed to work over the event loop , as an alternative to traditional servlets running on top of the classic thread pool.


Moreover, since The new reactive web is not a development, but rather a parallel direction with Spring MVC , it allows you to work outside of servlet containers and even create minimalist microframework-like applications — using the functional approach with WebFlux.fn .


Kotlin support


Kotlin is now not only the language officially supported by Google for development on Andriod, but also the language officially supported by Spring for backend development.


Kotlin support includes several aspects at once:



Fact to assess the scale and severity - the code on Kotlin in the Spring kernel is already greater than on Groovy.


New Documentation


Official documentation has been restructured and divided into small modules, grouped by functionality.


Other changes


There are a lot of them, but several key ones can be distinguished:



Conclusion


In general, a lot of changes, the new framework is the result of several years of work on the project. You can try the new Spring 5 using either Spring Boot 2.0 build snapshot or version M5 which will be released next week. The final version of Spring Boot 2.0 is expected towards the end of this year.


Useful links:



')

Source: https://habr.com/ru/post/339016/


All Articles