Thymeleaf 스프링 부트 설정
build.gradle
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
- 위 라이브러리를 추가하면 스프링 부트가 자동으로 ThymeleafViewResolver와 필요한 스프링 빈들을 등록한다.
application.properties
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html
- 위 설정은 기본 설정이므로 처음에는 적혀있지않다.
- 변경이 필요할 때 작성하여 설정하면 된다.