본문 바로가기
Spring/Spring Boot

Spring boot 2.x -> 3.x

by e-pd 2024. 2. 9.

 

 

 

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide

 

Spring Boot 3.0 Migration Guide

Spring Boot. Contribute to spring-projects/spring-boot development by creating an account on GitHub.

github.com

가장 먼저 참고할 문서는 공식문서의 마이그레이션이다.

다음 문서도 마이그레이션에 도움이 많이 됐다.
https://techblog.lycorp.co.jp/ko/how-to-migrate-to-spring-boot-3

해야하는 일

  1. Java 17 이상 사용
  2. Spring Boot 버전을 3이상으로 수정
  3. Java EE를 Jakarta EE로 변경

마이그레이션시 마주하는 이슈

javax -> jakarta EE

Kafka 사용시 ListenableFuture deprecated

QueryDSL 마이그레이션

MySQL Custom Function

Spring Security

Swagger

  • 기존의 springfox를 썼다든지 마이그레이션 이후 작동 안한다면 springdoc-openapi를 사용하자
    https://springdoc.org

@Where is deprecated

SnakeCaseStrategy is deprecated

  • Jackson 설정이 바뀐 것이 있다. @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) 를 사용하자.

Feign client 이슈

좋은 레퍼런스가 많아서 스프링부트 3로 업데이트하는데 큰 이슈는 없었다. 추가로 마이그레이션 과정에서 몇가지 처리해야하는 내용들을 추가했고 더 추가할 예정.

'Spring > Spring Boot' 카테고리의 다른 글

Flyway  (0) 2021.06.22
다국어 설정  (0) 2020.08.11
Gradle import  (0) 2020.02.25