Spring Boot 3.3 Release Notes
Upgrading From Spring Boot 3.2
Jersey Observability
Micrometer 1.13 has deprecated its Jersey support in favor of Jersey’s jersey-micrometer module.
If you application uses Jersey metrics, add a dependency on org.glassfish.jersey.ext:jersey-micrometer when upgrading.
To support observations with Jersey, the MetricsApplicationEventListener has been replaced with a ObservationApplicationEventListener.
If you were using a JerseyTagsProvider to customize the tags, you’ll now need to implement a JerseyObservationConvention bean to do that.
Dependency Management for Dropwizard Metrics Removed
Dependency management for Dropwizard Metrics has been removed. Spring Boot does not depend directly upon Dropwizard Metrics and, therefore, does not require a specific version. If your application depends on Dropwizard Metrics directly, update your build configuration to specify a version that meets its needs.
Prometheus Client 1.x
Spring Boot 3.3 includes support for the Prometheus Client 1.x. This release of the client contains some breaking changes, e.g. changes to the exported metric names. Use of the Prometheus Push Gateway is not supported with the 1.x client, until this support has been added from the Prometheus maintainers.
If you want to continue to use the 0.x version of the Prometheus client, remove io.micrometer:micrometer-registry-prometheus from your dependencies and add io.micrometer:micrometer-registry-prometheus-simpleclient instead.
Spring Boot contains auto-configuration for simpleclient in a deprecated form which will be removed in Spring Boot 3.5.0.
For a more detailed migration guide, please see this section of the Micrometer wiki.
Flyway 10
This release upgrades to Flyway 10. Flyway 10 is more modular than previous versions and support for several databases has been moved into a number of new, database-specific modules. If you are using any of the following databases, update your dependencies accordingly:
-
DB2 (
flyway-database-db2) -
Derby (
flyway-database-derby) -
HSQLDB (
flyway-database-hsqldb) -
Informix (
flyway-database-informix) -
PostgreSQL (
flyway-database-postgresql) -
Redshift (
flyway-database-redshift) -
SAP HANA (
flyway-database-saphana) -
Snowflake (
flyway-database-snowflake) -
Sybase ASE (
flyway-database-sybasease)
Infinispan 15
This release upgrades to Infinispan 15.
Infinispan 15 has raised its Jakarta EE baseline and, as such, a number of its -jakarta modules, such as infinispan-core-jakarta, no longer exist. Use their standard alternatives, such as infinispan-core, instead.
Git Commit ID Maven Plugin
The plugin has been upgraded to 8.0.x.
As part of this upgrade, the default date format is now yyyy-MM-dd’T’HH:mm:ssXXX.
This provides compatibility with Maven’s reproducible builds feature.
Minimum Requirements Changes
Native Build Tools
If you’re using the Native Build Tools to build your project with GraalVM, make sure you’re using at least a 0.10.x version of the plugin. Maven users should get the correct version automatically when using the Spring Boot parent.
Gradle users should update the plugin version in the plugins block:
plugins {
// ...
id 'org.graalvm.buildtools.native' version '0.10.2'
// ...
}New and Noteworthy
CDS Support
CDS is a JVM feature that can help reduce the startup time and memory footprint of Java applications. Spring Boot now has support for easy creation of a CDS friendly layout. This layout can be created by extracting the uber JAR with the help of the tools jarmode:
java -Djarmode=tools -jar your-application.jar extractThis creates a your-application/your-application.jar and the needed libraries in a your-application/lib folder. The application can then be executed with java -jar your-application/your-application.jar.
The tools jarmode supports two commands at the moment:
-
extract, as shown above. This supersedes-Djarmode=layertools extract. -
list-layers, which supersedes-Djarmode=layertools list-layers.
Run
java -Djarmode=tools -jar your-application.jar help <command>to get more details.
If you have used layers.enabled = false in your Gradle build file or <layers><enabled>false</enabled></layers> in your Maven pom.xml, please note that disabling layers no longer prevents the inclusion of the jarmode JAR. Use includeTools on the BootJar or BootWar task or <configuration><includeTools>false</includeTools></configuration> on the spring-boot-maven-plugin for that.
Observability Improvements
Observations can now be enabled for the simple, direct and stream listener and on the RabbitTemplate via properties.
Support for the Micrometer @SpanTag annotation has been added.
Added support for tagged fields for both Brave and OpenTelemetry. Support for local fields has been added for Brave.
Added a process InfoContributor, which can be enabled with management.info.process.enabled=true.
If no application name is explicitly set, unknown_service is now used for OpenTelemetry.
This aligns the Spring Boot default to the OpenTelemetry specification.
Spring for Apache Pulsar
The properties spring.pulsar.listener.observation-enabled and spring.pulsar.template.observations-enabled changed their default value from true to false. This has been done to unify the observation-enabled properties, all of which now default to false. If you were relying on Pulsar observations and didn’t enable them explicitly, add the properties spring.pulsar.listener.observation-enabled=true and spring.pulsar.template.observations-enabled=true to your configuration to restore the old behavior.
Brave and Zipkin
Brave has been updated to 6.0, and Zipkin to 3.0. With that upgrade, the Zipkin support in Spring Boot got new features, like specifying the encoding in which data is reported to the Zipkin API. See #39049 for details.
A new JDK HttpClient based Zipkin sender has been implemented. This sender only depends on the JDK and will be the default sender in Spring Boot 3.5.0, superseding the WebClient and RestTemplate sender implementations.
Spring for Apache Pulsar Improvements
There are now properties to configure cluster-level failover for Pulsar under the spring.pulsar.client.failover namespace.
Spring Security Improvements
A JwtAuthenticationConverter (or a ReactiveJwtAuthenticationConverter) is now auto-configured if one of the properties is set:
-
spring.security.oauth2.resourceserver.jwt.authority-prefix -
spring.security.oauth2.resourceserver.jwt.principal-claim-name -
spring.security.oauth2.resourceserver.jwt.authorities-claim-name
Service Connections
Support for Apache ActiveMQ Artemis
Service connection support for Apache ActiveMQ Artemis has been added.
The Testcontainers support works with the ArtemisContainer container, the Docker Compose support works with the apache/activemq-artemis image.
Support for the official ActiveMQ Classic images
The ActiveMQ service connection now supports the apache/activemq-classic docker image and the ActiveMQContainer testcontainer.
Support for LDAP
Service connection support for LDAP with the osixia/openldap container has been added
Bitnami Container Images
The Spring Boot support for Docker Compose will detect and configure containers from Bitnami in addition to official images for several of the supported technologies, including Cassandra, Elasticsearch, MariaDB, MySQL, MongoDB, Neo4j, PostgreSQL, RabbitMQ, and Redis. See the updated reference documentation for more information.
Virtual Threads
If a AsyncTaskExecutor is available in the context, it is now registered on the websocket ChannelRegistration.
If using virtual threads, this will usually be a virtual threads enabled SimpleAsyncTaskExecutor, making Websockets virtual thread capable.
Batch Transaction Manager
A @BatchTransactionManager annotation has been introduced to make it easier to configure Spring Batch to use a custom transaction manager.
See the updated documentation for more information.
Base64 Resources
Resources can now be loaded as Base64 encoded text values using a base64: prefix.
This can be useful with resources such as SSL certificates, as in this example:
spring:
ssl:
bundle:
pem:
mybundle:
keystore:
certificate: "base64:LS0tLS1CRUdJTi..."
private-key: "base64:QmFnIEF0dHJpYn..."SBOM Actuator Endpoint
The spring-boot-actuator module now includes a new SBOM endpoint.
By default the endpoint will serve META-INF/sbom/bom.json or META-INF/sbom/application.cdx.json files located in your jar.
Additional configuration has also been provided in the spring-boot-parent-starter POM to make SBOM plugins easier to configure.
See the documentation for more details.
Documentation Updates
The Spring Boot documentation has been migrated to Antora, providing more structure as well as better search capabilities.
Auto-configure Embedded Web Server SSL with SNI
When configuring a Tomcat, Netty, or Undertow embedded web server with SSL/TLS, it is now possible to configure multiple hostnames with unique trust material for each to support Server Name Indication (SNI). See the updated documentation for more information on the configuration options.
Miscellaneous
Apart from the changes listed above, there have also been lots of minor tweaks and improvements including:
-
spring.config.activate.on-cloud-platform=nonewill now match when the active cloud platform isnull -
Added a configuration option for "path" field inclusion in error responses. This can be controlled by the
server.error.include-pathproperty. It defaults toalways -
The WebFlux
DefaultErrorAttributesnow userequest.requestPath().value()to populate path error attribute -
Added the property
server.tomcat.threads.max-queue-capacityto configure the maximum queue size for the Tomcat web server connector -
The configuration processor now checks the
additional-spring-configuration-metadata.jsonfor superfluous keys and fails if it encounters any -
Added a property named
spring.task.execution.pool.shutdown.accept-tasks-after-context-closeto control if theThreadPoolTaskExecutoraccepts tasks after the context shutdown has been initiated -
Added the property
server.reactive.session.max-sessionsto control the number of maximum sessions when using WebFlux -
ExecutionContextSerializerbeans are now automatically applied to the Spring Batch configuration. If none is provided,DefaultExecutionContextSerializeris used -
The started log messages produced by the four supported web servers (Jetty, Netty, Tomcat, and Undertow) are now more consistent
-
Added
client-idandsubscription-durableproperties for JMS connections -
If a class implements multiple servlet interfaces, like
FilterorServlet, it will now be registered for all of the interfaces (e.g. one registration for a filter and one for a servlet) -
The new reactive
sessionsactuator endpoint can now return sessions for a given username -
The environment’s default profiles are now included in the env actuator endpoint’s response
-
Added the new property
spring.liquibase.ui-serviceto specify the default UI service logger used by Liquibase -
Added the new property
spring.security.saml2.relyingparty.registration.*.name-id-formatto specify the NameID format of a SAML registration -
Added the new property
server.mime-mappingswhich allows additional custom MIME type mappings to be configured -
jakarta.inject:jakarta.inject-apiis now included in Spring Boot’s dependency management -
The date format of the
git-commit-id-maven-pluginhas been changed toyyyy-MM-dd’T’HH:mm:ssXXXto allow reproducible builds. See #39606 for details -
The
spring-boot-starter-jettyno longer includesjetty-jndiby default. If you need JNDI support, please addorg.eclipse.jetty:jetty-jndito your dependencies -
On Windows it’s now possible to start the application with
mvn spring-boot:runeven if it has an extremely large number of dependencies. Before 3.3.0 it would fail with a "The filename or extension is too long" exception due to the length of the classpath -
The new property
spring.data.jdbc.dialectcan be used to set the dialect for Spring Data JDBC. If not set, the dialect will be auto-detected -
Add more gap between the orders of
CloudFoundryVcapEnvironmentPostProcessorandConfigDataEnvironmentPostProcessor -
The Cassandra driver changed coordinates from
com.datastax.osstoorg.apache.cassandra -
Setting the new property
management.observations.long-task-timer.enabledtofalsenow prevents the creation of aLongTaskTimerfor every observation -
Beans in the infrastructure role are now automatically excluded from lazy initialization
-
Spring Config now uses the conversion service from the environment when resolving properties
-
Set the new property
spring.docker.compose.start.skiptoneverto always execute the Docker Compose startup command -
A new
spring.graphql.websocket.keep-aliveproperty has been added -
JPA auto-configuration now uses a
ManagedClassNameFilterbean if one is defined -
A new
spring.rabbitmq.template.allow-list-patternsproperty has been added
Deprecations in Spring Boot 3.3.0
-
ZipkinRestTemplateBuilderCustomizerandZipkinWebClientBuilderCustomizerin favor of the newZipkinHttpClientBuilderCustomizer -
-Djarmode=layertools extractin favor of-Djarmode=tools extract --layers -
-Djarmode=layertools listin favor of-Djarmode=tools list-layers -
layers.includeLayerToolson theBootJarandBootWartask in favor ofincludeTools -
<layers><enabled>…</enabled></layers>in favor of<includeTools>…</includeTools> -
The
@ServletEndpoint,@ControllerEndpointand@RestControllerEndpointannotations for declaring Actuator endpoints have been deprecated. Instead, applications should use the@Endpoint/@ReadOperation/@WriteOperationmodel for contributing endpoints. See #31768