본문 바로가기
일이야기/Environment

Intellij 에서 springboot live reload

by Cloud9™ 2022. 5. 16.

1. Maven / Gradle 로 devtools 추가

Maven

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>

 

Gradle

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

 

2. Intellij 에서 Build project automeatically 체크 

File -> Setting -> Build, Execution, Deployment -> compiler : Build Project automatically 체크

 

3-1. 2021.2 이전 버전

intellij 에서 compiler.automake.allow.when.app.running 체크 (2021.2 이전)

Shift 두번 누르고 Registry 검색 Registry... 클릭
compiler.automake.allow.when.app.running 체크

 

3-2. 2021.2 이후 버전

intellij 에서 Allow auto-make to start even if developed application is currently running 체크 (2021.2 이후)

 

출처 : https://mkyong.com/spring-boot/intellij-idea-spring-boot-template-reload-is-not-working/

댓글