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.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
What’s New in Spring Boot 2.6? Key Features and Configuration Changes

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=30

3. 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=false

5. New Runtime Java Information Endpoint

management.info.java.enabled=true

Example 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 requests

8. Disk Space Metrics

disk.free  – free disk space<br/>disk.total – total disk capacity

9. 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.localespring.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=true

12. 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-matcher

13. Executor Environment Info Disabled

management.info.env.enabled=true

14. 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

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

JavaDockerredisConfigurationMetricsSpring BootSecurity
Java Architecture Diary
Written by

Java Architecture Diary

Committed to sharing original, high‑quality technical articles; no fluff or promotional content.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.