-
Notifications
You must be signed in to change notification settings - Fork 41.9k
Spring Boot 4.1.0 M2 Release Notes
|
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
When spring.config.import is used, it’s now possible to specify the encoding. In the past, property files always have been loaded with the ISO-8859-1 encoding (which is still the default). To load them using a different encoding, you can use this syntax:
spring.config.import=classpath:import.properties[encoding=utf-8]The info endpoint now provides additional information about the process. The following fields are now available in the endpoint’s response:
-
process.uptime -
process.startTime -
process.currentTime -
process.timezone -
process.locale -
process.workingDirectory
Refer to the endpoint’s API documentation for further details.
Service connections to RabbitMQ Streams are now supported with both Testcontainers and Docker Compose.
When using Testcontainers, a service connection can be made using @ServiceConnection(type = RabbitStreamConnectionDetails.class).
The rabbitmq_stream plugin must also be enabled in the container as shown in the following example:
private static RabbitMQContainer createRabbitMqStreamContainer() {
RabbitMQContainer container = TestImage.container(RabbitMQContainer.class);
container.addExposedPorts(RABBITMQ_STREAMS_PORT);
String enabledPlugins = "[rabbitmq_stream].";
container.withCopyToContainer(Transferable.of(enabledPlugins), "/etc/rabbitmq/enabled_plugins");
return container;
}When using Docker Compose, the RabbitMQ service must map container port 5552.
As with Testcontainers, the rabbitmq_stream plugin must also be enabled as shown in the following example:
services:
rabbitmq:
image: '{imageName}'
environment:
- 'RABBITMQ_DEFAULT_USER=myuser'
- 'RABBITMQ_DEFAULT_PASS=secret'
configs:
- source: plugins
target: /etc/rabbitmq/enabled_plugins
ports:
- '5552'
configs:
plugins:
content: "[rabbitmq_stream]."Spring Boot 4.0.0-M2 moves to new versions of several Spring projects:
Numerous third-party dependencies have also been updated, some of the more noteworthy of which are the following:
Apart from the changes listed above, there have also been lots of minor tweaks and improvements including:
-
Customizers for
OtlpHttpLogRecordExporterBuilderandOtlpGrpcLogRecordExporterBuilderhave been added. -
Additional mime types that should be compressed when sending HTTP responses can be configured using
server.compression.additional-mime-types -
Kotlin extensions for
TestEntityManagerhave been added. -
The actuator info endpoint now returns certificates from the truststore, too.
-
Value objects now bind
Optionalparameters asOptional.empty()rather thannull. This applies to any@ConfigurationPropertiesthat use constructor binding. -
Compression can now be used when exporting metrics over OTLP. To enable compression set
management.otlp.metrics.export.compression-modetogzip.