Table of contents
1.
Introduction
2.
Spring Boot 2.0
2.1.
What's New
2.2.
What's Changed
2.3.
What's Evolving
3.
New Features
4.
Performance Improvements
4.1.
Lazy Initialization
4.2.
Java 13 Support
4.3.
Immutable Binding
4.4.
RSocket Support
5.
Dependency Upgrades
6.
Deprecations in Spring Boot 2.2
7.
Overall Improvements
8.
Frequently Asked Questions (FAQs)
9.
Key Takeaways
Last Updated: Oct 24, 2024

Spring Boot Version

Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Several application development frameworks are available, but one of the most popular frameworks when working with Java is the Spring framework.

In this article, we will see about the new Spring Boot version. We will also see the new features available in the Spring Boot 2.0 version. We will learn about the essential performance improvements achieved in the Spring Boot 2.0 version.

Let us get started.

Spring Boot 2.0

Firslty, we will learn about what Spring Boot is?

So, Spring Boot is one of the modules of the Spring Framework. It helps us to build a stand-alone application with very minimal or almost zero configurations.

Our Spring Boot Course dives deep into these concepts, enabling you to create efficient applications

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

The new features which are available in Spring Boot 2.0 version are:

  • 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

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.

Dependency Upgrades

Some dependencies that 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

Deprecations in Spring Boot 2.2

The deprecations of the Spring Boot 2.2 version are as mentioned below:

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

Overall Improvements

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 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.

Frequently Asked Questions (FAQs)

What is Spring?

The Spring framework is one of the most popular application development frameworks of Java. The important feature of the spring framework is dependency injection or the Inversion of Control.

What is Spring Boot?

Spring Boot is one of the modules of the Spring Framework. It helps us to build a stand-alone application with very minimal or almost zero configurations.

Does the Spring Boot 2.2 version support Java13?

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

Key Takeaways

In this article, we learnt about the new Spring Boot version. We also saw the new features available in the Spring Boot 2.0 version. We also learned about the essential performance improvements achieved in the Spring Boot 2.0 version.

Recommended Readings:

Apart from this, you can also expand your knowledge by referring to these articles on Java and Web development

Happy Learning!

 

Live masterclass