Spring
[Gradle] spring-boot-devtools 추가
yong_ღ'ᴗ'ღ
2022. 12. 9. 21:14
HTML 파일 수정할 때마다 재시작해서 확인하기 번거로우니까
spring-boot-devtools 라이브러리 추가해주면, 서버 재시작 없이 View 파일 변경해서 확인 가능!
→ build > rebuild (ctrl + shift + f9)
✔ build.gradle 파일 dependencies에 아래 추가
compileOnly("org.springframework.boot:spring-boot-devtools")
✔ File > Settings > compiler > Build project automatically 체크
✔ File > Settings > Advanced Settings
> Allow auto-make to start even if developed application is currently running 체크
https://docs.spring.io/spring-boot/docs/1.5.16.RELEASE/reference/html/using-boot-devtools.html
20. Developer tools
Applications that use spring-boot-devtools will automatically restart whenever files on the classpath change. This can be a useful feature when working in an IDE as it gives a very fast feedback loop for code changes. By default, any entry on the classpath
docs.spring.io