전체 Release Notes 목록은 이곳에서 확인할 수 있습니다.
https://luvstudy.tistory.com/tag/Release%20Notes
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Release-Notes
14 revision 기준으로 작성됨
Spring Boot 4.0 Release Notes
Spring Boot 3.5에서 업그레이드하기
이 릴리스는 Spring Boot의 메이저 릴리스이므로, 기존 애플리케이션을 업그레이드하는 과정이 평소보다 다소 복잡할 수 있습니다.
업그레이드를 돕기 위해 Spring Boot 3.5 애플리케이션을 4.0으로 전환할 때 참고할 수 있는 전용 마이그레이션 가이드 를 마련해 두었습니다.
만약 현재 더 이전 버전의 Spring Boot를 사용 중이라면, Spring Boot 4.0으로 migration 하기 전에 먼저 Spring Boot 3.5로 업그레이드 할 것을 강력히 권장합니다.
주요 변경 사항 및 주목할 점
팁: 구성(configuration) 변경점의 전체 목록은 configuration changelog 를 확인하세요.
Milestones Available from Maven Central
4.0.0-M1부터 Spring Boot의 모든 마일스톤(및 릴리스 후보)이 https://repo.spring.io 뿐만 아니라 Maven Central에도 게시됩니다.
이를 통해 4.x 계열의 새 마일스톤을 보다 쉽게 시도해 볼 수 있습니다.
Gradle 9
Spring Boot 애플리케이션 빌드에 Gradle 9이 지원됩니다. Gradle 8.x(8.14 이상)에 대한 지원도 계속 유지됩니다.
HTTP Service Clients
Spring Boot는 이제 HTTP Service Clients에 대한 자동 구성(auto-configuration) 및 구성 속성 지원을 포함합니다.
HTTP 서비스 클라이언트를 사용하면 일반 Java 인터페이스에 어노테이션을 달아두기만 하면 Spring이 해당 인터페이스의 구현체를 자동으로 생성해 줍니다.
예를 들어, 다음 인터페이스는 "echo" 서비스 호출에 사용할 수 있습니다:
@HttpExchange(url = "https://echo.zuplo.io")
public interface EchoService {
@PostExchange
Map<?, ?> echo(@RequestBody Map<String, String> message);
}
이 기능의 자세한 내용은 문서 를 참고하세요.
API Versioning
Auto-configuration이 Spring MVC 와 Spring WebFlux 에서의 API 버전 관리를 위해 추가되었습니다.
API 버전 관리는 spring.mvc.apiversion.* 또는 spring.webflux.apiversion.* 속성으로 구성할 수 있습니다.
보다 정교한 제어가 필요하면 ApiVersionResolver, ApiVersionParser, ApiVersionDeprecationHandler 타입의 bean을 정의할 수 있습니다.
자세한 내용은 참조 문서(MVC , WebFlux )를 확인하세요.
JmsClient
JMS에 대한 자동 구성은 이제 새로운 JmsClient API 를 지원합니다.JmsTemplate 및 JmsMessagingTemplate에 대한 지원은 변경되지 않았습니다.
Task Decoration
작업 스케줄링 및 실행에 대한 자동 구성은 이제 여러 개의 TaskDecorator bean을 지원합니다.
context에 여러 TaskDecorator bean이 존재하면, 이들을 위임(delegate)하는 CompositeTaskDecorator가 생성됩니다.
개별 데코레이터들은 @Order 또는 Ordered에서 정의한 순서대로 호출됩니다.
OpenTelemetry starter
새로운 스타터 spring-boot-starter-opentelemetry가 추가되었습니다.
이 스타터는 OTLP를 통해 메트릭과 트레이스를 내보내기 위한 모든 필요한 의존성을 포함합니다.
또한 OpenTelemetry SDK를 자동 구성합니다.
Configuration Properties Metadata for External Types
이제 @ConfigurationProperties로 표시된 타입이 다른 모듈에 위치한 타입을 참조할 수 있게 되었습니다.
해당 모듈에서 메타데이터를 가져오려면(필요한 경우) 애노테이션 프로세서를 추가하고 대상 타입에 @ConfigurationPropertiesSource를 표시해야 합니다.
자세한 내용은 문서 를 참조하세요.
SSL Info
SSL info contribution에서 certificate validity threshold에 대한 지원이 제거되었습니다.
이전에 WILL_EXPIRE_SOON 상태였던 인증서는 이제 VALID로 표시됩니다.
인증서의 시작일과 종료일에 대한 정보는 계속 제공됩니다.
SSL Health
구성된 threshold (management.health.ssl.certificate-validity-warning-threshold) 내에 만료될 인증서를 하나 이상 포함하는 인증서 체인은
이제 health response의 detail의 새로운 expiringChains 항목으로 나열됩니다.WILL_EXPIRE_SOON 상태는 더 이상 사용되지 않으며, 만료 예정 인증서는 VALID 상태로 표시됩니다.
MongoDB Health Indicators
MongoDB health indicator가 재작업되어 더 이상 Spring Data MongoDB를 필요로 하지 않습니다.
이를 통해 MongoDB Java Driver를 직접 사용하는 경우에도 health information을 제공할 수 있게 되었습니다.
이 변경의 일환으로 health indicator는 spring-boot-data-mongodb에서 spring-boot-mongodb로 이동했으며,
관련 패키지 명도 그에 맞춰 업데이트 되었습니다.
MongoDB Properties
spring.data.mongodb.representation.big-decimal이라는 새 property가 도입되어 Spring Data MongoDB가 MongoDB에 BigDecimal(및 BigInteger) 값을 저장하는 방식을 제어할 수 있습니다.
여러 property의 이름이 변경되었습니다.
자세한 내용은 migration guide 를 참조하세요.
Kotlin Serialization
Spring Boot는 이제 Kotlin Serialization 지원을 위해 새로운 spring-boot-kotlinx-serialization-json 모듈과 이에 대응하는 spring-boot-starter-kotlin-serialization을 제공합니다.
이 모듈은 Json bean을 제공하고 사용 가능한 spring.kotlinx.serialization.json.* 속성으로 구성됩니다.
RestTestClient
새로 도입된 RestTestClient 에 대한 지원이 추가되었습니다.
일반적인 @SpringBootTest 또는 @AutoConfigureMockMvc를 사용하는 경우, 기본 MockMvc 인스턴스에서 동작하는 RestTestClient를 autowire 할 수 있습니다.
통합 테스트(예: 포트가 지정되었거나 랜덤 포트인 @SpringBootTest)에서는 실행 중인 서버를 대상으로 하는 RestTestClient를 inject 하여 사용할 수 있습니다.
Redis Static Master/Replica
Static Master/Replica에 대한 자동 구성이 추가되었습니다.
이 기능은 Lettuce에서만 지원됩니다.
사용하려면 새로운 spring.data.redis.masterreplica.nodes property로 정적 노드 목록을 제공하세요.
Redis Observability
Redis 자동 구성은 이제 MicrometerCommandLatencyRecorder 대신 MicrometerTracing을 자동 구성하도록 개선되었습니다.MicrometerTracing은 Observation API에서 동작하며 metric과 span을 모두 제공합니다.
Dependency Upgrades
Spring Boot 4.0에서는 여러 Spring 프로젝트의 새로운 버전으로 이동합니다:
- Micrometer 1.16
- Micrometer Tracing 1.6
- Reactor 2025.0
- Spring AMQP 4.0
- Spring Batch 6.0
- Spring Data 2025.1
- Spring Framework 7.0
- Spring GraphQL 2.0
- Spring HATEOAS 3.0
- Spring Integration 7.0
- Spring for Apache Kafka 4.0
- Spring LDAP 4.0
- Spring for Apache Pulsar 2.0
- Spring REST Docs 4.0
- Spring Security 7.0
- Spring Session 4.0
- Spring WS 5.0
위에 링크된 것들을 포함해 여러 Spring 프로젝트의 핵심 종속성이 새 버전으로 업그레이드되었습니다(세부 링크는 원문 참조).
- Artemis 2.43.0
- Brave 6.3
- Commons Codec 1.19
- Commons Lang3 3.19.0
- Couchbase Client 3.9
- Ehcache3 3.11.1
- Elasticsearch Client 9.1
- Flyway 11.11
- GraphQL 24
- Groovy 5.0
- Gson 2.13.2
- H2 2.4
- Hibernate 7.1
- Hibernate Validator 9.0
- HikariCP 7.0
- HtmlUnit 4.16.0
- Jackson 3.0
- Jakarta Annotation 3.0
- Jakarta Persistence 3.2
- Jakarta Servlet 6.1
- Jakarta Validation 3.1
- Jakarta WebSocket 2.2
- Jakarta WS RS 4.0
- Jedis 6.2.0
- Json-smart 2.6.0
- Jetty 12.1
- Kafka 4.1.0
- Kotlin 2.2.20
- Kotlin Serialization 1.9
- Lettuce 6.8.1.RELEASE
- Liquibase 5.0
- Maven AntRun Plugin 3.2
- Maven Javadoc Plugin 3.12
- Mockito 5.20
- MongoDB 5.6.0
- MSSQL JDBC 13.2
- Native Build Tools Plugin 0.11
- Neo4j Java Driver 6.0
- OpenTelemetry 1.54.0
- Pulsar 4.1.0
- R2DBC H2 1.1
- R2DBC Postgresql 1.1
- Rabbit AMQP Client 5.27
- Selenium 4.37
- Selenium HtmlUnit 4.35
- SnakeYAML 2.5
- TestContainers 2.0
- Tomcat 11.0
- XML Maven Plugin 1.2
Miscellaneous
위에 나열된 변경 사항 외에도 여러 사소한 조정과 개선이 포함되어 있습니다. 주요 항목은 다음과 같습니다:
자동 구성된 Micrometer 메트릭 관련 기능은 이제 @Counted 및 @Timed 메서드에서 @MeterTag를 지원하며, SpEL 기반의 ValueExpressionResolver를 사용합니다.
MongoDB에 대한 @ServiceConnection 지원은 이제 Testcontainers의 MongoDBAtlasLocalContainer를 지원합니다.
class not found error로 인해 configuration property binding이 실패할 때 error message가 개선되었습니다.
여러 reactive auto-configuration class의 이름이 일관성을 위해 업데이트되었습니다.
auto-configuration class에서(상수를 제외한) public member들이 제거되었습니다.
auto-configuration은 원래부터 public API가 아니며, 이제 Java 메커니즘을 통해 이 점이 강제됩니다.
JDK HttpClient를 사용하는 자동 구성 HTTP 클라이언트는 spring.threads.virtual.enabled가 true일 때 virtual threading을 사용하도록 구성됩니다.
logging.console.enabled property가 추가되었습니다. 이를 false로 설정하면 콘솔 로깅이 비활성화됩니다.
Log4j 3의 Log4j Core configuration file detection이 개선되었습니다.
DevTools restart 시 resource lookup이 최적화되었습니다.
ScheduledTasksObservabilityAutoConfiguration가 일관성을 위해 ScheduledTasksObservationAutoConfiguration로 이름이 변경되었습니다.
Elasticsearch 인증에서 API 키를 사용하는 것이 새 spring.elasticsearch.api-key property를 통해 지원됩니다.
ConditionalOnEnabledTracing가 ConditionalOnEnabledTracingExport로 이름이 변경되었습니다.
management.tracing.enabled property가 management.tracing.export.enabled로 이름이 변경되었습니다.
SanitizableData.getKey() 및 SanitizableData.getLowerCaseKey()는 이제 null을 반환하지 않습니다.SanitizableData에서 key로 null을 전달하면 예외가 발생합니다.
PropertiesConfigAdapter에 더 나은 nullability handling을 위한 특수화된 interface 들이 도입되었습니다.
spring.dao.exceptiontranslation.enabled property가 spring.persistence.exceptiontranslation.enabled로 이름이 변경되었습니다.
Tomcat의 static cache의 max size는 이제 server.tomcat.resource.cache-max-size 속성으로 구성할 수 있습니다.
JSpecify nullability annotation이 더욱 정교해졌습니다.
이제 MANIFEST.MF에서 Spring-Boot-Jar-Type을 development-tool로 설정하여 uber jar에서 의존성을 제외할 수 있습니다.
Amazon Web Services(AWS) Elastic Container Service(ECS) 플랫폼이 이제 인식 가능한 CloudPlatform으로 추가되었습니다.
Micrometer의 @ObservationKeyValue에 대한 지원이 추가되었습니다.
JSpecify nullability annotation이 더욱 정교해졌습니다.
auto-configuration class에서 import 된 configuration의 public member 들은 package-private로 변경되었습니다.
HTML Unit의 LocalHostWebClient 및 LocalHostWebConnectionHtmlUnitDriver는 UriBuilderFactoryWebClient 및 UriBuilderFactoryWebConnectionHtmlUnitDriver로 대체되었습니다.
Elasticsearch Client의 sniffer 사용 여부를 제어하는 새 configuration property가 추가되었습니다.
Deprecations in Spring Boot 4.0.0
중요한 사용중단(Deprecation)
다음 항목들이 Deprecated로 표시되었습니다:
OperationMethod(Method method, OperationType operationType)는 이제OperationMethod(Method method, OperationType operationType, Predicate<Parameter> optionalParameters)를 사용하도록 교체 권장됩니다.- Jackson 2에 대한 지원은 더 이상 권장되지 않는 형태로 제공됩니다.
org.springframework.boot.env.EnvironmentPostProcessor는org.springframework.boot.EnvironmentPostProcessor로 대체되었으나, 업그레이드 부담을 줄이기 위해 이전 인터페이스는 당분간 Deprecated 형태로 남아 있습니다.
'Study > Java' 카테고리의 다른 글
| JDK 25 New Features (0) | 2025.10.09 |
|---|---|
| Spring Boot version Mappings 확인하기 (0) | 2025.09.11 |
| Spring Boot 4.0 Road to GA introduction (0) | 2025.09.11 |
| [troubleshooting] STS (Eclipse) github copilot plugin 설치 오류 (0) | 2025.08.28 |
| [troubleshooting] STS (Eclipse) lombok record builder annotation 사용 시 오류 (1) | 2025.08.15 |
| Spring Boot 3.5 Release Notes (1) | 2025.05.30 |
| [troubleshooting] eclipse Marketplace plugin 설치 불가 문제 (0) | 2025.05.08 |
| Eclipse(STS)에서 PlantUML을 사용하여 class diagram 보기 (0) | 2025.04.11 |
| Playwright 사용해 보기 (0) | 2025.03.29 |
| Spring Boot ConfigurationMetaData 사용해 보기 (0) | 2025.03.28 |