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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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

posted @ 2018-11-17 18:30  刚刚睡醒  阅读(1787)  评论(0编辑  收藏  举报