본문 바로가기
web/SpringBoot

Spring Boot 3

by 뽀리님 2023. 8. 16.

현재 개발하고 있는 프로젝트가 SpringBoot 3.1.0 버전대로 진행되게 되면서,

SpringBoot 3에 대한 내용을 정리해보았다.

 

SpringBoot 3.x 버전대를 쓰기위한 기본 스펙과 변경되는점, 기존에 혹시나 하위버전을 쓰고있었던 프로젝트가 있다면 마이그레이션 하는방법까지 정리하였다.

 

프로젝트 세팅방법은 차후 설명하겠다.

 

Spring Boot 3 (Spring Framework 6) 

✔ Java 17 이상을 지원 (Kotlin 1.7+)

✔ JavaEE -> Jakarta EE 로 변경 (javax.* -> jakarta.*)

✔ GraalVM 기반의 Spring Native가 3년간의 실험을 마치고 공식 지원 시작

✔ HTTP/RSocket Interface Clinet 제공 

✔ Micrometer Observation API가 자동으로 구성되며 Observability 공식지원시작

✔ HTTP API 에러처리를 위한 RFC 7807 Spec 지원

✔ 보안상의 이슈로 /api/hello 와 /api/hello/ 는 더 이상 같은 주소가 아님.

✔ Log4j2 / Logback 날짜의 기본값이 ISO-8601 표준을 따르게됨

✔ Deprecated(사용되지 않는) 된 모든 코드가 제거됨

👉 Spring Framework 6.x 의 새로운 기능 더 보기

 

What's New in Spring Framework 6.x

Spring Framework. Contribute to spring-projects/spring-framework development by creating an account on GitHub.

github.com

 

 

Spring Boot 3 마이그레이션

1. Java 17로 업그레이드

2. Spring Boot 2.7.x 로 순차적으로 (2.5 -> 2.6 -> 2.7) 업그레이드

3. Deprecated 코드를 찾아 (-Werror 옵션) 제거

4. 레거시 application.properties 및 application.yaml 을 확인(use-legacy-processing)

5. (옵션) AntPathMatcher 를 사용중이라면 성능이 더 좋은 PathPatternParser으로 변경

6. 타사 프로젝트에서 Jakarta EE 9 를 호환하는 릴리즈가 있는지 확인

7.  타사 프로젝트에서 Spring Framework 6 을 호환하는지 확인

8. Spring Boot 3 으로 마이그레이션

👉 Spring Boot 3 마이그레이션 전체 내용 더 보기

 

Preparing for Spring Boot 3.0

Spring Boot 2.0 was the first release in the 2.x line and was published on Feburary 28th 2018. We’ve just released Spring Boot 2.7 which means that, so far, we’ve been maintaining the 2.x line for just over 4 years. In total we’ve published 95 distin

spring.io

(참고) Spring Boot 2.7.x 는 2023년 11월까지 지원 예정