Since this is a major release of Spring Boot, upgrading existing applications can be a little more involved than usual. We've put together a dedicated migration guide to help you upgrade your existing Spring Boot 3.5 applications.
이것은 Spring Boot의 메이저 릴리스이기 때문에, 기존 애플리케이션을 업그레이드하는 것은 평소보다 좀 더 복잡할 수 있다. 우리는 여러분이 기존 Spring Boot 3.5 애플리케이션을 업그레이드하는 것을 돕기 위해 전용 마이그레이션 가이드를 마련했다.
If you're currently running with an earlier version of Spring Boot, we strongly recommend that you upgrade to Spring Boot 3.5 before migrating to Spring Boot 4.0.
만약 여러분이 현재 Spring Boot의 이전 버전을 실행하고 있다면, Spring Boot 4.0으로 마이그레이션하기 전에 3.5로 먼저 업그레이드할 것을 강력히 권장한다.4.0으로 바로 점프하지 말고 3.5를 거쳐 단계적으로 올리라는 조언.
Check the configuration changelog for a complete overview of the changes in configuration.
설정 변경사항의 완전한 개요를 보려면 configuration changelog를 확인해라."자세한 전체 목록은 저 링크 봐라"는 안내 문장.
Starting with 4.0.0-M1, all Spring Boot milestones (and release candidates) are now published to Maven Central in addition to https://repo.spring.io. This should make it easier to try new milestones in the 4.x line as they become available.
4.0.0-M1부터, 모든 Spring Boot 마일스톤(및 릴리스 후보)이 이제 https://repo.spring.io 에 더해 Maven Central에도 게시된다. 이로써 4.x 라인의 새 마일스톤이 나오는 대로 더 쉽게 사용해볼 수 있을 것이다.게시 장소가 하나 더 늘었다는 뜻.
Gradle 9 is now supported for building Spring Boot applications. Support for Gradle 8.x (8.14 or later) remains.
Gradle 9가 이제 Spring Boot 애플리케이션 빌드에 지원된다. Gradle 8.x(8.14 이상)에 대한 지원도 그대로 유지된다.뼈대는 Support remains(지원이 유지된다).
# Gradle 9 사용
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0-bin.zip
# 또는 기존 8.14 이상도 계속 사용 가능
# distributionUrl=...gradle-8.14-bin.zip
Spring Boot now includes auto-configuration support and configuration properties for HTTP Service Clients. HTTP Service Clients allow you to annotate plain Java interfaces and have Spring automatically create implementations of them.
Spring Boot는 이제 HTTP Service Client를 위한 자동 설정 지원과 설정 프로퍼티를 포함한다. HTTP Service Client는 여러분이 평범한 자바 인터페이스에 애너테이션을 달면, Spring이 자동으로 그 구현체를 만들어주도록 해준다.평범한 인터페이스에 애너테이션만 붙이면 Spring이 알아서 구현 코드를 만들어줌.
@Component
public class UserClient {
private final RestClient restClient;
public UserClient(RestClient.Builder builder) {
this.restClient = builder.baseUrl("https://api.example.com").build();
}
public User getUser(Long id) { // 메서드마다 직접 구현
return restClient.get().uri("/users/{id}", id)
.retrieve().body(User.class);
}
}
// 인터페이스 선언만 하면 Spring이 구현체를 자동 생성
public interface UserClient {
@GetExchange("/users/{id}")
User getUser(@PathVariable Long id);
}
// application.yml 에서 baseUrl 설정 → 구현 코드 불필요
The auto-configuration for JMS now includes support for the new JmsClient API. The support for JmsTemplate and JmsMessagingTemplate is left unchanged.
JMS를 위한 자동 설정은 이제 새로운 JmsClient API 지원을 포함한다. JmsTemplate과 JmsMessagingTemplate에 대한 지원은 변경되지 않은 채로 그대로 유지된다.새 API는 추가됐고, 기존 것들은 건드리지 않고 그대로 뒀다는 뜻.
@Autowired
private JmsTemplate jmsTemplate;
public void send(String msg) {
jmsTemplate.convertAndSend("my-queue", msg);
}
@Autowired
private JmsClient jmsClient;
public void send(String msg) {
jmsClient.destination("my-queue").send(msg); // 체이닝 방식
}
The auto-configurations for task scheduling and task execution now support multiple TaskDecorator beans. When the context contains multiple TaskDecorator beans, a CompositeTaskDecorator that delegates to them is created. The individual decorators are called in the order defined by @Order and Ordered.
task 스케줄링과 task 실행을 위한 자동 설정은 이제 여러 개의 TaskDecorator 빈을 지원한다. context가 여러 TaskDecorator 빈을 포함할 때, 그것들에게 위임하는 CompositeTaskDecorator가 생성된다. 개별 decorator들은 @Order와 Ordered로 정의된 순서대로 호출된다.원문 "in the ordered defined"는 문서 오타. 맞는 표현은 "in the order defined"(정의된 순서대로).
@Bean
public TaskDecorator taskDecorator() {
return new MdcTaskDecorator(); // 여러 개 등록하면 충돌
}
@Bean @Order(1)
public TaskDecorator mdcDecorator() { return new MdcTaskDecorator(); }
@Bean @Order(2)
public TaskDecorator tracingDecorator() { return new TracingTaskDecorator(); }
// → Spring이 CompositeTaskDecorator로 묶어 순서대로 실행
A new starter, spring-boot-starter-opentelemetry has been added. This starter brings in all necessary dependencies to export metrics and traces over OTLP. It will also auto-configure the OpenTelemetry SDK.
새로운 starter인 spring-boot-starter-opentelemetry가 추가되었다. 이 starter는 OTLP를 통해 metrics와 traces를 내보내는 데 필요한 모든 의존성을 가져온다. 또한 OpenTelemetry SDK를 자동 설정해준다.starter는 필요한 것들을 묶어주는 꾸러미. 의존성도 가져오고 SDK 설정도 해줌.
// build.gradle
implementation 'io.opentelemetry:opentelemetry-api'
implementation 'io.opentelemetry:opentelemetry-sdk'
implementation 'io.opentelemetry:opentelemetry-exporter-otlp'
// ... 필요한 것들을 일일이 나열 + SDK 수동 설정
// build.gradle
implementation 'org.springframework.boot:spring-boot-starter-opentelemetry'
// 필요한 의존성 자동 포함 + SDK 자동 설정
It is now possible for @ConfigurationProperties-annotated types to refer to types that are located in a different module. To source the metadata from those modules, you should add the annotation processor (if necessary) and flag the type with @ConfigurationPropertiesSource.
이제 @ConfigurationProperties가 붙은 타입이 다른 모듈에 위치한 타입을 참조하는 것이 가능하다. 그 모듈들로부터 메타데이터를 가져오려면, (필요하다면) annotation processor를 추가하고 해당 타입에 @ConfigurationPropertiesSource를 표시해야 한다.원래는 같은 모듈 타입만 됐는데, 이제 다른 모듈 타입도 참조 가능.
Support for the certificate validity threshold has been removed from the SSL info contribution. A certificate that had a status of WILL_EXPIRE_SOON will now appear as VALID. The information about the start and end of a certificate's validity remains.
인증서 유효성 임계값에 대한 지원이 SSL info contribution에서 제거되었다. WILL_EXPIRE_SOON 상태였던 인증서는 이제 VALID로 나타난다. 인증서 유효 기간의 시작과 종료에 대한 정보는 그대로 유지된다.거의 완벽했던 문단! remains, appear as, validity 다 정확히 처리.
Certificate chains that contain one or more certificates that will expire within the configured threshold (management.health.ssl.certificate-validity-warning-threshold) are now listed in a new expiringChains entry in the details of the health response. The status WILL_EXPIRE_SOON is no longer used and expiring certificates will have a status of VALID.
설정된 임계값 이내에 만료될 인증서를 하나 이상 포함하는 인증서 체인은, 이제 health 응답의 details에 있는 새로운 expiringChains 항목에 나열된다. WILL_EXPIRE_SOON 상태는 더 이상 사용되지 않으며, 만료 예정 인증서는 VALID 상태를 갖게 된다.곁다리(that절)가 두 겹: [임계값 내 만료될] 인증서를 [하나 이상 포함하는] 체인.
The MongoDB health indicators have been reworked so that they no longer require Spring Data MongoDB. This allows health information to be provided when using the MongoDB Java Driver directly.
MongoDB health indicator들은 더 이상 Spring Data MongoDB를 필요로 하지 않도록 재작업되었다. 이로써 MongoDB Java Driver를 직접 사용할 때도 health 정보가 제공될 수 있다.no longer는 이번엔 정확히 잡음!
As part of this change, the health indicators have moved from spring-boot-data-mongodb to spring-boot-mongodb. Their packages have also been updated accordingly.
이 변화의 일부로서, health indicator들은 spring-boot-data-mongodb에서 spring-boot-mongodb로 이동되었다. 그것들의 패키지도 그에 맞게 업데이트되었다.의존성이 바뀌었으니 코드 위치·패키지명도 따라 바뀜.
A new property, spring.data.mongodb.representation.big-decimal, has been introduced to control how Spring Data MongoDB stores BigDecimal (and BigInteger) values in MongoDB. A number of properties have also been renamed. See the migration guide for details.
새로운 프로퍼티인 spring.data.mongodb.representation.big-decimal이, Spring Data MongoDB가 BigDecimal(및 BigInteger) 값을 MongoDB에 어떻게 저장하는지를 제어하기 위해 도입되었다. 여러 프로퍼티들의 이름도 변경되었다. 자세한 내용은 마이그레이션 가이드를 봐라.
spring:
data:
mongodb:
representation:
big-decimal: decimal128 # BigDecimal 저장 방식 지정
Spring Boot now ships a new "spring-boot-kotlinx-serialization-json" module and corresponding "spring-boot-starter-kotlin-serialization" for Kotlin Serialization support. This will contribute a Json bean and configure it with the available spring.kotlinx.serialization.json.* properties.
Spring Boot는 이제 Kotlin Serialization 지원을 위한 새로운 spring-boot-kotlinx-serialization-json 모듈과, 그에 대응하는 spring-boot-starter-kotlin-serialization을 제공한다. 이것은 Json 빈을 제공하고, 사용 가능한 spring.kotlinx.serialization.json.* 프로퍼티로 그것을 설정한다.
// build.gradle.kts
implementation("org.springframework.boot:spring-boot-starter-kotlin-serialization")
// → Json 빈 자동 등록. application.yml 로 세부 설정:
// spring.kotlinx.serialization.json.pretty-print: true
Support for the newly introduced RestTestClient has been added. With a regular @SpringBootTest or when @AutoConfigureMockMvc is used, you can autowire a RestTestClient that operates on the underlying MockMvc instance.
새로 도입된 RestTestClient에 대한 지원이 추가되었다. 일반 @SpringBootTest를 쓰거나 @AutoConfigureMockMvc를 사용할 때, 여러분은 그 기반이 되는 MockMvc 인스턴스에서 동작하는 RestTestClient를 autowire(자동 주입)할 수 있다.
@Test
void getTodos() throws Exception {
mockMvc.perform(get("/api/todos"))
.andExpect(status().isOk())
.andExpect(jsonPath("$[0].title").value("Test"));
}
@Autowired RestTestClient client; // 자동 주입
@Test
void getTodos() {
client.get().uri("/api/todos")
.exchange()
.expectStatus().isOk()
.expectBody().jsonPath("$[0].title").isEqualTo("Test");
}
For integration tests, i.e. @SpringBootTest with either a defined or random port, a RestTestClient can be injected to target the running server.
통합 테스트의 경우, 즉 정해진 포트나 랜덤 포트를 사용하는 @SpringBootTest에서는, 실행 중인 서버를 겨냥하도록 RestTestClient를 주입할 수 있다.앞 문단은 MockMvc 기반 가짜 테스트, 이건 진짜 서버 띄우는 테스트.
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
class TodoIntegrationTest {
@Autowired RestTestClient client; // 실행 중인 서버를 겨냥
@Test
void getTodos() {
client.get().uri("/api/todos")
.exchange().expectStatus().isOk();
}
}
Auto-configuration for Static Master/Replica has been added. This feature is only supported by Lettuce. To use it, provide the list of static nodes using the new spring.data.redis.masterreplica.nodes property.
Static Master/Replica를 위한 자동 설정이 추가되었다. 이 기능은 오직 Lettuce에서만 지원된다. 이것을 사용하려면, 새로운 spring.data.redis.masterreplica.nodes 프로퍼티를 사용해서 static 노드들의 목록을 제공해라.To use it(~하려면), only supported by(오직 ~만)는 정확히 잡음!
spring:
data:
redis:
master-replica:
nodes:
- "master-host:6379"
- "replica1-host:6379"
- "replica2-host:6379"
The Redis auto-configuration has been improved to auto-configure MicrometerTracing, rather than MicrometerCommandLatencyRecorder. The former operates on the Observation API and provides both metrics and spans.
Redis 자동 설정이 MicrometerCommandLatencyRecorder보다는 MicrometerTracing을 자동 설정하도록 개선되었다. 전자(MicrometerTracing)는 Observation API에서 동작하며 metrics와 spans를 모두 제공한다.operates on, both A and B는 정확히 잡음!
// 기존: 지연시간 metrics만 수집
// (Observation API 미연동, spans 없음)
// Observation/Tracing 의존성이 있으면 자동으로
// MicrometerTracing 사용 → metrics와 분산추적 spans 모두 제공
implementation 'io.micrometer:micrometer-tracing-bridge-otel'
Spring Boot 4.0 Release Notes — github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Release-Notes
'릴리스노트' 카테고리의 다른 글
| Java 22 릴리스 노트 (1) | 2026.07.20 |
|---|---|
| Java 21 릴리스 노트 독해 겸 정리 - Major New Functionality(핵심 기능만) (1) | 2026.07.15 |