What’s New in Spring Boot 3 for Java Developers in 2023
A guide to the latest Spring Boot versions, as well as the addition of new features and enhancements to the latest update.
The Spring team released Spring Boot 3 in November 2022; it includes GraalVM native image support, enhanced Log4j2, Improved @ConstructorBinding, and a handful of new features. This article examines what’s new for Java web development in Spring Boot 3.
What is Spring Boot?
It is an open-source Java development framework that incorporates conventional Spring MVC features allowing developers to leverage Spring framework’s functionalities. If we talk about features, it has robust tools for developing production-grade, robust, asynchronous, and non-blocking web apps. In addition to this, developers can explore a range of configured templates, pre-built modules for services, and security, allowing developers to developer to develop applications at a faster pace.
The Spring Boot 2.X line was a remarkable journey for Java developers as it delivered 95 distinct releases and new functionalities throughout its 4-year timeframe. Nonetheless, the Spring team has ensured open-source support for the 2.7 version until November 2023, and commercial support will continue till 2025.
What’s New in Spring Boot 3?
Moving on to the new features, Spring Boot 3 has some significant additions, including GraalVM native image support, which optimizes application performance. Developers can leverage this new feature to create native images for their Spring Boot applications, leading to faster startup times and lower memory footprints. Additionally, the latest version includes several other updates and enhancements that improve the development experience and provide a better user interface.
1. GraalVM Native Image Support
Furthermore, it’s worth noting that Spring Boot 3 now supports GraalVM native images. This development allows developers to convert Spring Boot applications into native images that have a lesser memory footprint and faster compilation.
For those who don’t know, GraalVM is a runtime environment that allows for the faster execution of Java code. You can learn more about GraalVM in Spring by exploring the resources available here.
2. Log4j2 enhancement
Log4j2, the logging tool available in the Spring Boot framework, includes a few incremental improvements, which are as follows:
Profile-specific Configuration
Environment Properties Lookup
Log4j2 System Properties
For more details, you can check the documentation page.
3. Improved @ConstructorBinding Detection
These improvements in constructor binding will make it easier to use constructor binding with @ConfigurationProperties classes and simplify the code.
When you use constructor-bound @ConfigurationProperties, Spring Boot no longer requires the @ConstructorBinding annotation if the class has a single parameterized constructor. However, if you have more than one constructor, you still need to use @ConstructorBinding to inform Spring Boot which one to use.
For most users, this updated logic will allow for simpler @ConfigurationProperties classes. However, if you have a @ConfigurationProperties and want to inject beans into the constructor rather than binding it, you’ll now need to add an @Autowired annotation.
4. Micrometer Updates
Micrometer, a monitoring tool for Spring applications, includes several enhancements and improvements.
Auto-configuration for Micrometer Observation API
Auto-configuration for Micrometer Tracing
Auto-configuration for Micrometer’s OtlpMeterRegistry
5. Prometheus Support
In Spring Boot 3, Auto-Configuration for Prometheus Exemplars and Push Gateway can be configured to perform a PUT on shutdown. Furthermore, Spring Boot has deprecated the existing push setting and now recommends using post instead.
6. Miscellaneous
Auto-configuration for the new Elasticsearch Java Client has been introduced.
Apache HTTP client a JdkClientHttpConnector will now be auto-configured
The @SpringBootTest annotation can now use the main of any discovered @SpringBootConfiguration class if it’s available. This means that tests can now pick up any custom SpringApplication configuration performed by your main method.
Read more at https://www.brilworks.com/blog/whats-new-in-spring-boot-3-for-java-developers-in-2023/
















