카테고리 없음

[IntelliJ] spring-boot-devtools 를 이용한 재시작

dev-byul 2023. 8. 1. 11:49

[ 환경 ]

IntelliJ IDEA 2023.1.4 (Ultimate Edition)
Srping Boot

Gradle


의존성 추가

dependencies {
    developmentOnly("org.springframework.boot:spring-boot-devtools")
}

 

IntelliJ 설정

  • ItelliJ의 메뉴에서 ItelliJ IDEA -> Preferences를 선택한다. (윈도우 file -> Settings)

  • Preferences에서 Advanced Setting를 선택한 후 'Allow auto-make to start even if developed application is currently running'에 체크한다. 이는 애플리케이션을 실행한 후 코드를 수정하면 자동으로 재시작하는 설정이다.

  • Preferneces에서 complier를 검색한 후 'Build project automatically'에 체크한다.

  • Run에서 Edit configuration -> 실행 클래스 설정 -> spring boot -> On 'Update' Action 에서 네가지 옵션 중 하나를 선택한다.


참고

https://www.jetbrains.com/help/idea/updating-applications-on-application-servers.html

 

Update applications on application servers | IntelliJ IDEA

 

www.jetbrains.com