작업 환경
inteliJ 2019.3 Ultimate
kotlin 1.3.41
gradle 5.4.1 (kotlin dsl)
Project SDK openjdk 11.0.5
springboot 2.2.0
gradle 디펜던시 추가
implementation("org.springframework.boot:spring-boot-devtools")
https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools
크롬 확장기능 설치
LiveReload
Provides Chrome browser integration for the official LiveReload apps (Mac & Windows) and third-parties like guard-livereload and…
인텔리제이 설정
- Settings -> Build -> Compiler 에서
enable the Make Project Automatically
에 체크 - Settings -> Build -> Gradle 에서
Build and run using
항목을IntelliJ IDEA
로 설정 - 인텔리제이에서 액션 찾기로
registry
에 들어간 후compiler.automake.allow.when.app.running
에 체크 Run/Debug Configurations
->Running Application Update Policies
->Update classes and resources
에서On 'Update' action
을Hot swap classes and update trigger file if failed
로,On frame deactivation
을Update resources
로 설정
적용
- 타임리프 화면 띄우고 크롬에서 livereload 확장기능 버튼 클릭
- intellij 에서 타임리프 파일 수정 후 브라우저로 창 옮기면 재시작 안해도 업데이트 확인 가능
참고
https://blog.jetbrains.com/idea/2018/04/spring-and-spring-boot-in-intellij-idea-2018-1/
https://lhb0517.tistory.com/m/entry/SpringIntelliJ-SpringBoot-HotSwap-with-IntelliJ