Contents
see List작성일 2026. 04. 11.
Spring Boot 3.4 주요 변경사항
Spring Boot 3.4는 SSL 인증서 모니터링, Graceful Shutdown 기본 활성화, Actuator 엔드포인트 확장성 개선 등 운영 환경에 중요한 기능들이 추가되었습니다.
SSL 인증서 모니터링
프로덕션 환경에서 SSL 인증서 만료는 심각한 장애를 유발합니다. Spring Boot 3.4는 인증서 상태를 자동으로 모니터링합니다.
설정 방법
# application.yml
server:
ssl:
key-store: classpath:keystore.p12
key-store-password: ${SSL_PASSWORD}
key-store-type: PKCS12
management:
endpoints:
web:
exposure:
include: health,info
endpoint:
health:
show-details: always
health:
ssl:
enabled: true
# 만료 30일 전부터 경고
certificate-validity-warning-threshold: 30dActuator /info 엔드포인트에서 SSL 정보 확인
// GET /actuator/info 응답 예시
{
"ssl": {
"bundles": {
"server": {
"certificateChain": [{
"subject": "CN=example.com",
"issuer": "CN=Let's Encrypt Authority",
"serialNumber": "03:a1:...",
"validityStarts": "2026-01-15T00:00:00Z",
"validityEnds": "2026-07-15T00:00:00Z",
"status": "VALID"
}]
}
}
}
}Health Check 연동
// GET /actuator/health 응답 (인증서 만료 임박 시)
{
"status": "OUT_OF_SERVICE",
"components": {
"ssl": {
"status": "OUT_OF_SERVICE",
"details": {
"server": {
"status": "OUT_OF_SERVICE",
"details": {
"expiresIn": "15 days",
"validUntil": "2026-04-26T00:00:00Z"
}
}
}
}
}
}Graceful Shutdown 기본 활성화
Spring Boot 3.4부터 Graceful Shutdown이 기본으로 활성화됩니다. 서버 종료 시 진행 중인 요청을 완료한 뒤 종료합니다.
# application.yml - 기본값이 graceful로 변경됨
server:
shutdown: graceful # 기본값 (이전 버전은 immediate)
spring:
lifecycle:
timeout-per-shutdown-phase: 30s # 대기 시간 (기본 30초)Graceful Shutdown 동작 확인 코드
@RestController
public class SlowController {
@GetMapping("/slow")
public String slow() throws InterruptedException {
// 10초 걸리는 작업 시뮬레이션
Thread.sleep(10000);
return "완료";
}
}
// SIGTERM 수신 시:
// 1. 새 요청 수신 중단
// 2. 진행 중인 /slow 요청 완료 대기 (최대 30초)
// 3. 모든 요청 완료 후 서버 종료Actuator 엔드포인트 확장
EndpointExposureOutcomeContributor 인터페이스로 커스텀 엔드포인트 노출 조건을 정의할 수 있습니다.
@Component
public class InternalOnlyEndpointContributor
implements EndpointExposureOutcomeContributor {
@Override
public EndpointExposureOutcome getExposureOutcome(
String endpointId,
EndpointExposure exposure) {
// 특정 엔드포인트는 내부 네트워크에서만 노출
if ("env".equals(endpointId) || "configprops".equals(endpointId)) {
if (exposure == EndpointExposure.WEB) {
return EndpointExposureOutcome.DISALLOWED;
}
}
return EndpointExposureOutcome.NEUTRAL;
}
}핵심 정리
- SSL 인증서 자동 모니터링으로 만료 사전 감지
- Graceful Shutdown이 기본 활성화되어 무중단 배포 안정성 향상
- Actuator 확장 인터페이스로 엔드포인트 노출 세밀 제어
- Liquibase Customizer, JCache 속성 커스터마이징 지원
spring
| No | 작성일 | Title |
|---|---|---|
| 2124 | 2026. 02. 11. | Virtual Thread와 Spring WebFlux 성능 비교 |
| 2123 | 2026. 02. 11. | Spring AI: 스프링에서 LLM 통합하기 |
| 2122 | 2026. 02. 11. | Spring Boot 3.4 신기능과 마이그레이션 가이드 |
| 2013 | 2025. 11. 30. | Spring Cache 추상화 - Redis 캐시 적용 |
| 2012 | 2025. 11. 30. | Spring Validation - Bean Validation 활용 |
| 2011 | 2025. 11. 30. | Spring Profile로 환경별 설정 관리 |
| 2010 | 2025. 11. 30. | Spring AOP로 로깅과 트랜잭션 처리 |
| 2009 | 2025. 11. 30. | Spring Batch 대용량 데이터 처리 |
| 2008 | 2025. 11. 30. | Spring Cloud Gateway로 API Gateway 구축 |
| 2007 | 2025. 11. 30. | Spring WebFlux - 리액티브 프로그래밍 입문 |