springBoot引入thymyleaf

记录是为了更好的成长!

1、引入依赖

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>    

2、配置属性

spring.thymeleaf.cache=false
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.check-template-location=true
spring.thymeleaf.suffix=.html
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.content-type=text/html
spring.thymeleaf.mode=HTML5

以上内容代表个人观点,仅供参考,不喜勿喷。。。

猜你喜欢

转载自www.cnblogs.com/newbest/p/9975061.html
今日推荐