study/thymeleaf2 Spring boot - thymeleaf layout 적용 Spring boot 내에서 Thymeleaf를 사용하여 Page Layout을 설정했는데 이에 대한 과정과 간략한 사용 문법에 대해 정리했다. 우선 Thymeleaf를 사용하기 위해서는 의존성 추가가 필요하다. 1. dependency 추가 (Maven - pom.xml) org.springframework.boot spring-boot-starter-thymeleaf Thymeleaf로 레이아웃을 설정하기 위해서는 위의 의존성 외에 아래와 같은 의존성 추가가 필요하다. (Thymeleaf Layout Dialect ?) nz.net.ultraq.thymeleaf thymeleaf-layout-dialect 3.0.0 레이아웃에 설정에 앞서 쉬운 이해를 위해 폴더 구조를 사진으로 나타냈다. layout.. 2023. 2. 28. spring boot - thymeleaf 파일 설정 스프링 프로젝트에서 thymeleaf 사용을 위한 dependency 추가 및 환경 설정을 해보았다. 1. build.gradle에 dependencies를 추가한다. implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect' 2. src/main/resources/application.propreties에 아래와 같은 설정을 추가한다. spring.thymeleaf.cache=false spring.thymeleaf.check-template-location=true spring.thymeleaf.prefix=clas.. 2022. 12. 29. 이전 1 다음