It has been four years since Spring Boot1.0 was released, and This March SpringBoot2.0 was officially released. Let’s take a look at it.

Spring Boot relies on Spring and integrates the use of many frameworks to help developers develop easily. Spring Boot2.0 integrates many features of Spring5.0 and adds many new features. Take a look!

Java 8 based, Java 9 supported

In short, know that Spring Boot 2.0 requires Java 8 as the minimum release. In addition, many existing apis have been updated to take advantage of Java 8 features (including default methods on interfaces, feature callbacks, and new apis such as javax.time). If you are not already using Java 8, you should upgrade the JDK before you decide to develop Spring Boot 2.0 applications. The latest version of Spring Boot has also been tested with JDK 9. All jar packages are listed for compatibility with the module system.

Support Reactive network programming

Support Reactive network programming through Spring WebFlux/ webflux. fn. Spring Boot provides automatic configuration for annotation-based Spring WebFlux applications and webflux.fn, which provides a more versatile style API.

Automatic configuration and starter-POM

Provides automatic configuration and starter-POM for Reactive Spring Data Cassandra, MongoDB, Couchbase and Redis.

Reactive Spring

Many projects in the Spring portfolio currently provide first-class support for Reactive Applications. Reactive Applications (currently fully asynchronous and non-blocking) are designed for the event loop execution model (instead of the traditional one-request-per-thread). Spring Boot 2.0 fully supports Reactive Applications with automatic configuration and starter-POM. The Spring Boot itself has also been updated internally as necessary to provide Reactive AlerNatives (most notably embedded server support).

Support for embedded Netty

WebFlux does not rely on the Servlet API, but will provide support for embedded Netty for the first time. Adding spring-boot-starter-webflux dependencies to POM will introduce Netty 4.1 and Ractor Netty.

HTTP/2

HTTP/2 for Tomcat, Undertow, and Jetty. However, keep in mind that support depends on your Web server and application environment of choice.

Gradle Support

The Gradle plug-in for Spring Boot has been largely rewritten to support many significant improvements. But Spring Boot now requires Gradle 4.x.

Support the Kotlin 1.2 x

The latest Spring Boot release also includes support for Kotlin 1.2.x and provides a runApplication function to run Spring Boot applications using conventional Kotlin.

JOOQ

Spring Boot 2.0 can now automatically detect jOOQ dialects against DataSource. A new @JooqTest annotation has also been introduced to simplify tests that only use jOOQ. JOOQ is a Java-based toolkit for accessing relational databases. JOOQ takes the simplicity and security of traditional ORM to manipulate data while retaining the flexibility of native SQL, and is more like an intermediate layer between ORMS and JDBC. For code farmers who like to write SQL, JOOQ can fully satisfy your desire for control and can be used to write SQL in Java code.

Support InfluxDB

To enable InfluxDB support, you must set the spring.dolphin. url property and include Influxdb-javaon in the classpath.

This article provides a brief introduction to SpringBoot2.0. Although there are plenty of online introductions, it’s a good idea to start this series with one. In the following chapters, you’ll see how to use SpringBoot2.0.


This is the end of this article, if you feel that there is a harvest after reading, welcome to like, follow, add the public account [level 2 natural disaster], see more wonderful history!!