Home » Spring Boot Version

Spring Boot Version

by Online Tutorials Library

Spring Boot Version

The latest version of Spring Boot is 2.0. It introduces a lot of new features along with some modifications and replacement.

Spring Boot 2.0

Let’s have a sneak peek at Spring Boot 2.0.

  • What’s New
              Infrastructure Upgrade
              Spring Framework 5
  • What’s Changed
              Configuration Properties
              Gradle Plugin
              Actuators endpoints
  • What’s Evolving
              Security
              Metrics

The pivotal team has upgraded the infrastructure in which the following tools are involved:

  • Supports Java 8 or above versions
  • Supports Apache Tomcat 8 or above versions
  • Supports Thymeleaf 3
  • Supports Hibernate 5.2

In Spring Framework 5, the Pivotal team upgraded the following:

  • Reactive Spring
    1. Servlet stack
      1. Servlet Container
      2. Servlet API
      3. Spring MVC
    2. Reactive Stack
      1. Netty, Servlet 3.1, Undertow
      2. Reactive HTTP Layer
      3. Spring WebFlux
  • Functional API
  • Kotlin Support

The latest version of Spring Boot is 2.2.1. This release of Spring Boot includes 110 fixes, dependency upgrades, and improvements.

In the Spring Boot v2.2.1, the annotation @ConfigurationProperties scanning is now disabled by default. We need to be explicitly opted into by adding the @ConfigurationPropertiesScan annotation.

New Features

  • Support constructor binding for property nested inside a JavaBean
  • Add config property for CodecConfigurer.maxInMemorySize in WebFlux
  • Make test slices’ type exclude filters public
  • Support amqps:// URIs in spring.rabbitmq.addresses

Dependency upgrades

Some dependencies have been upgraded in Spring Boot v2.2.1 are as follows:

  • Mongodb 3.11.2
  • Spring Security 5.2.1.RELEASE
  • Slf4j 1.7.29
  • Spring Hateoas 1.0.1.RELEASE
  • Hibernate Validator 6.0.18.Final
  • Hibernate 5.4.8.Final
  • Jetty 9.4.22.v20191022
  • Spring Framework 5.2.1
  • Spring AMQP 2.2.1
  • H2 1.4.200
  • Spring Security 5.2
  • Spring Batch 4.2

Some important and widely used third-party dependencies are upgraded in this release are as follows:

  • Micrometer 1.3.1
  • Flyway 6.0.7
  • Elasticsearch 6.8.4
  • JUnit 5.5
  • Jackson 2.10

Performance Improvements

In Spring Boot 2.2.1 the following performance has been improved:

Lazy Initialization

In Spring Boot 2.2.1, we can enable global lazy initialization by using the property spring.main.lazy-initialization property. It reduces the application startup time.

Java 13 Support

Spring Boot 2.2.1 now supports the latest version of Java that is Java 13.

Immutable Binding

In the newer version of Spring Boot, Configuration properties support constructor-based binding. The class annotates with @ConfigurationProperties annotation is to be immutable. It can be enabled by adding an annotation @ConfugurationProperties to a class or one of its constructors with @ConstructorBinding. 

RSocket Support

It is a part of Spring Security. RSocket integration is auto-configured when an application finds spring-security-rsocket is present on the classpath.

Deprecations in Spring Boot 2.2

  • The property logging.file has renamed to logging.file.name.
  • The property logging.path has renamed to logging.file.path.
  • The server.connection-timeout property has been deprecated in favor of server-specific properties.
  • Joda time support is deprecated in favor of java.time.

The following improvements are made in the Spring Boot 2.2.1

  • Java: Spring Boot 2.2.1
  • Spring Framework 5.2: This release of Spring Boot upgrades to Spring Framework to 5.2.
  • JMX is disabled: In this version, JMX is not enabled by default. We can enable it by using the property jmx.enabled=true. If you are using the IDE feature to monitor your application, we need to enable it.
  • Fork enabled by default: Spring Boot application that ran by Maven Plugin is now forked by default.
  • JUnit 5: Spring Boot v2.2.1 provides JUnit 5 by default. JUnit 5’s vintage engine is also included by default that supports existing JUnit 4-based test classes. We can also use JUnit 4 and JUnit 5 based test classes in the same module.
  • AssertJ 3.12: This release of Spring Boot upgrades to AssertJ 3.12. It contains a breaking API changes for assertions related to Iterator.
  • Hibernate Dialect: In the newer version of Spring Boot, Hibernate chose the dialect to use rather than applying a default dialect based on the detected database.
  • Gradle Requirements: The latest version of Spring Boot requires Gradle 4.10.

You may also like