Spring Boot 2.2 official release, a substantial performance boost + Java 13 support

Before Spring Boot 2.2 did not release on time, due to the Spring Framework 5.2 release blocked postponed. With the successful launch after the Spring Framework 5.2.0, Spring Boot 2.2 followed suit, released the first version: 2.2.0. Here's a look at this updated version are what content is worth our attention.

Component version update

The Spring Framework components rely updated version:

  • Spring AMQP 2.2
  • Spring Batch 4.2
  • Spring Data Moore
  • Spring Framework 5.2
  • Spring HATEOAS 1.0
  • Spring Integration 5.2
  • Spring Kafka 2.3
  • Spring Security 5.2
  • Spring Session Corn

Third-party packages are also involved in the framework of the updated version-dependent:

  • Elasticsearch 6.7
  • Flyway 6.0
  • Jackson 2.10
  • JUnit 5.5
  • Micrometer 1.3
  • Reactor Dysprosium
  • Solr 8.0

A substantial performance boost

Spring Boot performance issue is that we often see Tucao keywords in the content platform. This time in Spring Boot 2.2, for a performance that do a substantial optimization. Start application speed will become faster, the memory footprint will become less.

Meanwhile, in order to speed up the launch of an application, but also adds a global configuration parameter initialization delay spring.main.lazy-initialization, which allows us to complete the application faster start-up operation, but it is worth noting that the delayed start will have the following effects:

  • Application during initialization of the delay, HTTP request processing will take longer
  • Otherwise might occur during the operation in the start-up period error appears, will delay the start of

Java support 13

Since the Spring Framework 5.2 adds support for Java 13, so naturally Spring Boot 2.2 adds this feature. Meanwhile, Spring Boot 2.2 for older versions of Java 11, Java 8 support is still good. So, for users still using Java 8 may also ease the upgrade to use.

Immutable binding @ConfigurationProperties

Configuration Properties now supports constructor binding, the binding allows @ConfigurationPropertiesannotation modified class is immutable. By using @ConstructorBindingannotations modified @ConfigurationPropertiesto enable binding based on one class constructor or a constructor. May be used in the constructor parameter configuration provides binding property @DefaultValue和@DateTimeFormatannotations like.

For more details refer to the document: https: //docs.spring.io/spring-boot/docs/2.2.0.RELEASE/reference/html/spring-boot-features.html#boot-features-external-config-constructor -binding

RSocket support

We added a starter configured for automated RSocket realization: spring-boot-starter-rsocket. When the project depends on spring-security-rsocketwhen the starter will automatically configure Spring Security to achieve integration of RSocket.

For more details refer to the document: https: //docs.spring.io/spring-boot/docs/2.2.0.RELEASE/reference/html//spring-boot-features.html#boot-features-rsocket

Health Check packet support

Now Spring Boot Actuator in a wide variety of health indicators can be implemented grouping. If the application is deployed to Kubernetes, a typical requirement is that you may need a different set of health indicators to "liveness" and "readiness" of the probe. This time, we can define different packet through configuration properties, such as: The following create custom groups only have a DataSource indicators:

management.endpoint.health.group.custom.include=db

By accessing localhost8080/actuator/health/custom, you can access a custom set.

For more details refer to the document: https: //docs.spring.io/spring-boot/docs/2.2.0.RELEASE/reference/html//production-ready-features.html#health-groups

Other updates

Release Notes also records many other changes and improvements. Readers can view more updates via the link below:

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.2-Release-Notes

Reference material

  • Spring Boot 2.2.0

    I welcome the attention of the public number: Program ape DD, get exclusive organize learning resources and push dry goods daily.
    If you are interested in my topic content, you can focus on my blog: didispace.com

Guess you like

Origin www.cnblogs.com/didispace/p/11697042.html