springBoot引入thymyleaf

Posted 刚刚睡醒

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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

以上是关于springBoot引入thymyleaf的主要内容,如果未能解决你的问题,请参考以下文章