-
Notifications
You must be signed in to change notification settings - Fork 40.7k
Spring Boot 3.4.0 M2 Release Notes
For changes in earlier milestones, please refer to:
The EndpointExposure.CLOUD_FOUNDRY
enum value used with the @ConditionalOnAvailableEndpoint
has been deprecated in favor of EndpointExposure.WEB
.
Typical Spring Boot application will probably not be effected by this change, however, if you have custom Cloud Foundry specific actuator endpoint beans you should update your conditions to use EndpointExposure.WEB
.
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
@ConditionalOnSingleCandidate
now supports @Fallback
beans.
The condition will match if there’s a single primary bean or, if there are no primary beans, if there’s a single non-fallback bean.
When type matching, bean-based conditions will now ignore any beans that are not default candidates.
By declaring that a bean is not a default candidate (using @Bean(defaultCandidate=false)
), a bean of an auto-configured type can now be defined without causing the auto-configure bean of the same type to back off. This reduces the configuration required to, for example, use two DataSource
beans or two EntityManagerFactory
beans in the same application.
If you’re using SSL bundles, there’s now a new endpoint showing SSL information (validity dates, issuer, subject, etc.) available under /actuator/info
.
This endpoint also shows soon to be expired certificates to alert you that they need to be rotated soon. There’s a new configuration property named management.health.ssl.certificate-validity-warning-threshold
to configure the threshold.
A new health check monitoring the SSL certificates has been added, too. If a certificate is invalid, it sets the status to OUT_OF_SERVICE
.
The /scheduledtasks
Actuator endpoint now exposes additional metadata about scheduled tasks, such as "next scheduled execution time" and "last execution time, status and exception".
Support for Grafana LGTM has been added using the grafana/otel-lgtm
container image.
An imagePlatform
option has been added to the Maven and Gradle plugins for building OCI images.
This option can be used to specify the operating system and architecture of any CNB builder, run, and buildpack images that are pulled in order to run CNB buildpacks.
This can be used to build an image for an operating system and architecture that is different from the OS/architecture of the host platform, when the host platform supports emulation of the other OS/architecture (for example, when using Rosetta on a Mac with Apple silicon to emulate the AMD archicture on an ARM host).
See the Maven or Gradle documentation for more information.
Client certificates can now be used to authenticate with a Couchbase cluster, as an alternative to basic username and password authentication. See the reference documentation for more details.
The default value of an Enum
is now detected by the annotation processor.
If you have added manual metadata to provide the value for a custom property, make sure to remove it.
FreeMarker variables that are used by the auto-configured FreeMarker’s Configuration
object can now be customized.
To do so, define one or more beans of type FreeMarkerVariablesCustomizer
.
These are invoked according to their defined order (if any).
Configuration properties are now provided for configuring a default tenant and namespace.
The defaults apply when consuming or producing messages with a topic URL that is not fully qualified.
Configure them using the spring.pulsar.defaults.topic.tenant
and spring.pulsar.defaults.topic.namespace
configuration properties or define your own PulsarTopicBuilder
bean.
Set spring.pulsar.defaults.topic.enabled=false
to disable the defaults.
It is now possible to extend Spring Boot to expose actuator endpoints in a pluggable way.
The new EndpointExposureOutcomeContributor
interface can be implemented to influence @ConditionalOnAvailableEndpoint
conditions.
This extension should make it easier to offer additional platform integrations similar to our existing Cloud Foundry support.
Spring Boot 3.4.0-M2 moves to new versions of several Spring projects:
-
Spring AMQP 3.2.0-M2
-
Spring Authorization Server 1.4.0-M1
-
Spring Framework 6.2.0-M7
-
Spring Integration 6.4.0-M2
-
Spring Kafka 3.3.0-M2
-
Spring Pulsar 1.2.0-M1
-
Spring Security 6.4.0-M3
-
Spring Session 3.4.0-M2
Numerous third-party dependencies have also been updated, some of the more noteworthy of which are the following:
-
Flyway 10.17
-
Hibernate 6.6
-
JUnit Jupiter 5.11
-
Kafka 3.8
-
Liquibase 4.29
-
Micrometer 1.4.0-M2
-
Micrometer Tracing 1.4.0-M2
-
OpenTelemetry 1.41
-
Reactor 2024.0.0-M5
-
Testcontainers 1.20
Apart from the changes listed above, there have also been lots of minor tweaks and improvements including:
-
@Name
can now be used on the field of a JavaBean-style configuration property to customize its name. -
When derived from another
DataSource
,DataSourceBuilder
can now determine the Driver class name using the source DataSource’s URL if it does not expose the Driver class name. -
Liveness and Readiness health probes are now automatically enabled on Cloud Foundry Platforms.
-
The new property
spring.application.version
can be used to read and set the application version. The default value for the property is taken from theImplementation-Version
of the manifest. -
Docker Compose now supports multiple Docker Compose configuration files.
-
The auto-configured
EntityManagerFactoryBuilder
defines the native (e.g. Hibernate) properties as well. -
Spring Integration’s
TaskScheduler
is now virtual thread aware, even if@EnableScheduling
hasn’t been used. -
The banner is now automatically disabled if using console structured logging.
-
@ConditionalOnAvailableEndpoint
now has avalue
alais forendpoint
.
-
org.springframework.boot.ResourceBanner#getApplicationVersion(Class<?>)
in favor ofspring.application.version
property. -
org.springframework.boot.SpringApplication#logStartupInfo(boolean)
in favor oforg.springframework.boot.SpringApplication#logStartupInfo(ConfigurationApplicationContext)
. -
org.springframework.boot.logging.logback.ApplicationNameConverter
in favor oforg.springframework.boot.logging.logback.EnclosedInSquareBracketsConverter
. -
org.springframework.boot.actuate.autoconfigure.endpoint.expose.EndpointExposure#CLOUD_FOUNDRY
in favor oforg.springframework.boot.actuate.autoconfigure.endpoint.expose.EndpointExposure#WEB
.