What’s New in Spring Boot 2.6? Key Features and Configuration Changes
Spring Boot 2.6 introduces Cookie SameSite support, reactive session timeout, custom data‑masking rules, automatic Redis pool configuration, richer runtime Java metrics, build‑info personalization, new startup and disk metrics, enhanced Docker image building, and many deprecated properties removed or renamed, improving security and performance.
1. Cookie SameSite Support
Strict – cookies sent only for same‑site requests.
Lax – safe cross‑site requests can send cookies.
None – disables SameSite restriction; must be used with Secure.
2. Reactive Session Personalization
The current version allows dynamic configuration of the reactive session timeout.
server.reactive.session.timeout=303. Custom Data‑Masking Rules
Spring Boot 2.3 introduced configuration properties for masking sensitive endpoint data; the same mechanism continues in 2.6.
4. Automatic Redis Connection Pool Configuration
If commons-pool2.jar is on the classpath, Spring Boot automatically configures a Redis connection pool for both Jedis and Lettuce.
To disable the pool:
spring.redis.jedis.pool.enabled=false<br/>spring.redis.lettuce.pool.enabled=false5. New Runtime Java Information Endpoint
management.info.java.enabled=trueExample JSON output:
{
"java": {
"vendor": "BellSoft",
"version": "17",
"runtime": {
"name": "OpenJDK Runtime Environment",
"version": "17+35-LTS"
},
"jvm": {
"name": "OpenJDK 64-Bit Server VM",
"vendor": "BellSoft",
"version": "17+35-LTS"
}
}
}6. Build‑Info Personalization
Spring Boot Maven plugin can generate build-info.properties automatically.
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludeInfoProperties>
<excludeInfoProperty>version</excludeInfoProperty>
</excludeInfoProperties>
</configuration>
</plugin>7. Startup Metrics
application.started.time: time to start the application<br/>application.ready.time: time until the app is ready to serve requests8. Disk Space Metrics
disk.free – free disk space<br/>disk.total – total disk capacity9. Docker Image Build Enhancements
Spring Boot’s built‑in docker‑maven‑plugin now supports custom image tags, network configuration, and build‑cache settings.
10. Important Changes – Removed or Renamed Properties
Spring MVC and servlet properties moved (e.g., spring.web.locale → spring.mvc.locale).
LoggingSystemProperties replaced by LogbackLoggingSystemProperties.
ConfigFileApplicationListener removed; use ConfigDataEnvironmentPostProcessor.
Undertow filter initialization properties renamed.
SpringApplication.contextClass() removed; use contextFactory().
CloudFoundryVcapEnvironmentPostProcessor largely removed – use with caution.
ApplicationEnvironmentPreparedEvent and ApplicationStartingEvent methods removed for BootstrapContext support.
Spring Data Cassandra health endpoint removed.
11. Bean Circular References Disabled by Default
Circular bean references are prohibited; to allow them set:
spring.main.allow-circular-references=true12. Spring MVC Default Path‑Matching Strategy
The default strategy changed from AntPathMatcher to PathPatternParser , offering better performance for complex patterns.
To revert to AntPathMatcher:
spring.mvc.pathmatch.matching-strategy=ant-path-matcher13. Executor Environment Info Disabled
management.info.env.enabled=true14. Application Startup Log Property Renamed
The property logged as spring.boot.application.running is now spring.boot.application.read.
Reference
Detailed property change list: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.6.0-Configuration-Changelog
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java Architecture Diary
Committed to sharing original, high‑quality technical articles; no fluff or promotional content.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
