Spring Boot

[Spring Boot] Thymeleaf 리소스 변경 시 Live reload 적용 오류 해결 방법

KEMON 2020. 8. 26. 21:29
728x90

먼저, 기본적인 Live reload 설정(Devtools 의존성 추가, Copiler에서 Auto설정 등)을 했다고 가정한다.

검색해서 나온 설정을 해도 Live Reload가 적용이 안될 때가 있는데 그럴때는

파일 구조

 

1. Html Reload

spring.thymeleaf.cache=false
spring.thymeleaf.prefix=file:src/main/resources/templates/

2. Css, Js Reload

spring.resources.static-locations=file:src/main/resources/static/

위와 같이 application.properties를 설정해주면 된다!!!

728x90