[SpringBoot] - 3 SpringBoot Version 2.0 New Features

1 as a reference to the Java 8

Spring Boot 2.0 requires Java version must be 8 or higher, Java 6 and 7 are no longer supported.

Embedded container package 2 restructuring

To support the use of reactive scene, container embedded package structure was reconstructed magnitude bit big.

EmbeddedServletContainerIt is renamed WebServer, and org.springframework.boot.context.embeddedthe packet is redirected to org.springframework.boot.web.embeddedthe next packet. For example, if you want to use TomcatEmbeddedServletContainerFactorya callback interface to customize the embedded Tomcatcontainer, you should use now TomcatServletWebServerFactory.

3 Servlet-specificof server propertiesadjustment

A large number of Servletexclusive server.* propertieswas moved to the server.servletnext:

Old property New property
server.context-parameters.* server.servlet.context-parameters.*
server.context-path server.servlet.context-path
server.jsp.class-name server.servlet.jsp.class-name
server.jsp.init-parameters.* server.servlet.jsp.init-parameters.*
server.jsp.registered server.servlet.jsp.registered
server.servlet-path server.servlet.path

It can be seen some clues that server is no longer the only servlet, there are others to join.

4 Actuatordefault mapping

ctuator endpoint (endpoint) is now mapped to the default /application, for example, /infothe endpoint is now in /application/info. But you can use management.context-pathto override this default.

5 Spring Loadedis no longer supported

Since the Spring Loadedproject has been moved up attic, so no longer support Spring Loadedthe. Now I suggest you to use Devtools. Spring LoadedIt is no longer supported.

6 Support Quartz Scheduler

Spring Boot 2 provides support for the Quartz scheduler. You can join the spring-boot-starter-quartz starter is enabled. And support for memory-based and based on jdbc two kinds of storage.

7 OAuth 2.0 support

Spring Security OAuth project functions will migrate to the Spring Security. Will OAuth 2.0.

8 Support Spring WebFlux

WebFlux module name is spring-webflux, derived from the class name of Flux Flux in the Reactor. The module includes support for client and server-side push event and WebSocket of reactive HTTP, server. For developers, the more important is the development of server-side, which is the focus of this article. On the server side, WebFlux supports two different programming models: the first is based on Java annotations Spring MVC in a manner used; the second is functional programming model for Java lambda expressions 8 based. These two models only differ in the programming code is written. They run on the same underlying architecture reaction formula, and therefore in the same run time. WebFlux need to provide underlying support runtime, can run on a support WebFlux Servlet 3.1 Servlet container nonblocking IO API, or other asynchronous runtime environments, such as Netty and Undertow.

Version 9

Jetty
requirement Jetty minimum version 9.4.

Tomcat
requires a minimum version of Tomcat 8.5.

Hibernate
requires a minimum version of Hibernate 5.2.

Gradle
requires a minimum Gradle version 3.4.

SendGrid
SendGrid minimum supported version is 3.2. In order to support this upgrade, username and password have been blown away. Because the API key now is the only supported authentication methods.

Published 675 original articles · won praise 214 · Views 140,000 +

Guess you like

Origin blog.csdn.net/weixin_42112635/article/details/104871239