Thymeleaf

Environment

Basic

프로젝트 시작시 spring-boot-starter-thymeleaf 를 선택했다면 아래와 같은 의존성은 이미 지정되어 있을 것이다.

compile('org.springframework.boot:spring-boot-starter-thymeleaf')
Plus
application.properties
  • 개발 도중 템플릿이 캐쉬되는 것을 막기위해 캐쉬를 false 로 설정한다.
  • 엄격한 html 체크를 부드럽게 하기 위해 spring.thymeleaf.mode=LEGACYHTML5 로 지정한다.
# Production 환경에서는 spring.thymeleaf.cache=true 이어야 한다. 
spring.thymeleaf.cache=false 
spring.thymeleaf.mode=LEGACYHTML5
dependency

spring.thymeleaf.mode=LEGACYHTML5 를 적용하기 위해 아래와 같은 의존성을 지정한다.

compile('net.sourceforge.nekohtml:nekohtml:1.9.21')
browser

브라우저는 동일 url 로 호출하는 static resource 들을 캐쉬하고 있으므로 캐쉬를 삭제한다. 한번만 삭제해주면 된다.

results matching ""

    No results matching ""