Skip to content

Spring Boot 2.4.0 M1 Release Notes

Andy Wilkinson edited this page Jun 22, 2020 · 17 revisions

Spring Boot 2.4.0 M1 Release Notes

Upgrading from Spring Boot 2.3

JUnit 5’s Vintage Engine Removed from spring-boot-starter-test

If you upgrade to Spring Boot 2.4 and see test compilation errors for JUnit classes such as org.junit.Test, this may be because JUnit 5’s vintage engine has been removed from spring-boot-starter-test. The vintage engine allows tests written with JUnit 4 to be run by JUnit 5. If you do not want to migrate your tests to JUnit 5 and wish to continue using JUnit 4, add a dependency on the Vintage Engine, as shown in the following example for Maven:

<dependency>
    <groupId>org.junit.vintage</groupId>
    <artifactId>junit-vintage-engine</artifactId>
    <scope>test</scope>
    <exclusions>
        <exclusion>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
        </exclusion>
    </exclusions>
</dependency>

If you are using Gradle, the equivalent configuration is shown in the following example:

testImplementation("org.junit.vintage:junit-vintage-engine") {
    exclude group: "org.hamcrest", module: "hamcrest-core"
}

Removal of Plugin Management for Flatten Maven Plugin

Spring Boot’s build no longer makes use of the Flatten Maven Plugin (flatten-maven-plugin) and plugin management for it has been removed. If you were relying on Spring Boot’s managed version, you should add your own plugin management.

Deprecations from Spring Boot 2.3

Minimum requirements changes

New and Noteworthy

Tip
Check the configuration changelog for a complete overview of the changes in configuration.

Configuration property for H2 Console’s web admin password

A new configuration property, spring.h2.console.settings.webAdminPassword, for configuring H2 Console’s web admin password has been introduced. The password controls access to the console’s preferences and tools.

CqlSession-Based Health Indicators for Apache Cassandra

New CqlSession based health indicators, CassandraDriverHealthIndicator and CassandraDriverReactiveHealthIndicator, have been introduced. One of these indicators will be auto-configured when Cassandra’s Java Driver is on the classpath but Spring Data Cassandra is not. When Spring Data Cassandra is present on the classpath, the existing Spring Data Cassandra-based health indicators are used as before.

Filtered Scraping with Prometheus

The Actuator’s Prometheus endpoint, /actuator/prometheus, now supports an includedNames query parameter that can be used to filter the samples that are included in the response. See the Actuator API documentation for further details.

Miscellaneous

Apart from the changes listed above, there have also been lots of minor tweaks and improvements including:

  • Version of the JVM on which the application is running is now logged on startup

Deprecations in Spring Boot 2.4.0 M1

Clone this wiki locally