본문 바로가기

IDE (Integrated Development Environment)/IntelliJ IDEA

인텔리제이(IntelliJ) 소스 변경후 서버 재시작 없이(선택가능) 자동 반영

728x90

 

 

build.grdle : dependencies 추가

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

 

application.properties 추가

spring.devtools.livereload.enabled=true
spring.devtools.restart.enabled=false
spring.thymeleaf.cache=false

backend 개발시 restart를 true로 변경해주면 소스변경을 감지하고 서버를 재실행시켜준다.

thymeleaf는 본인의 탬플릿에 맞게 설정

 

 

File-Setting (Ctrl + Alt + S)

shift 두번 누르고 registry에서  compiler.automake.allow.when.app.running  체크는 구버전일경우,

2021.2 버전부터 Registry가 아니라 Advacned Settings에서 세팅

 

위 방법으로도 안될시

 

Run - Editconfigurations

Modify options

on 'update'action - update classes and resources

on frame deactivation - update classes and resources 변경


//외장 톰캣일 경우

(EditConfigurations - Deplyment 탭에서
war exploded가 deploy 되어야 설정가능)

EditConfigurations - Server 탭에서
on 'update'action : update classes and resources
on frame deactivation : update classes and resources 변경
728x90