[ 프로그래밍 ]

[IntelliJ] 스프링 라이브 리로드 기능 쓰기

RootJUiCE 2022. 2. 25. 15:47

 

 

라이브 리로드를 이용하면 Java 스프링 개발 시 코드나 정적 리소스를 수정하면 알아서 재실행 해준다.

 

 

build.gradle 에 추가

implementation 'org.springframework.boot:spring-boot-devtools'

 

 

application.properties 에 추가

spring.devtools.livereload.enabled=true

 

 

Settings(Ctrl + Alt + S) 에서 다음 두 체크박스 찾아서 체크

 

Build, Execution, Delployment / Compiler 에
Build project automatically

 

Advanced Setting 에
Allow auto-make to start even if developed application is currently running

 

두 번째 설정인 Allow auto-make 모시깽이는 옛날IntelliJ Registry 에 compiler.automake.allow.when.app.running 레지스트리가 이전된 것이다. 참고 링크(로딩 느림)

 

 

 

 

Gradle 새로고침 후 IntelliJ 재실행 하고 라이브리로드 테스트