HanJun.Dev
[IntelliJ] Spring Boot JAVA파일 또는 html파일 변경시 자동 재시작 방법 본문
공통 : implementation 'org.springframework.boot:spring-boot-devtools' 라이브러리를 추가한다.
- html 파일 자동 변경 : html 파일을 컴파일만 해주면 서버 재시작 없이 view파일 변경이 가능하다.
build -> Recompile - JAVA 파일 자동 변경: 코드를 변경만 하면 자동으로 서버재시작이 되면서 변경된 코드가 실행된다.
preferences-Build,Execution,Deployment-Compiler에서 Build project automatically 체크
preferences-Advanced Settings에서 Compiler - Allow auto-make to start even if deployed application is currently running 체크
* 브라우저에서 새로고침할 때 캐시로 인해 이전 데이터가 들어갈 수 도 있어서 캐시를지우면서 새로 고치는게 좋다.
(캐시지우고 새로고침 하는 단축키 cmd + shift + R)