springboot2.0整合thymeleaf

在SpringBoot2.0整合thymeleaf,自动会整合thymeleaf3.0版本的,无需改thymeleaf的版本
在pom.xml的配置的如下


        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-thymeleafartifactId>
        dependency>

thymeleaf使用自动使用缓存的,故在开发阶段需要禁缓存,在application.yml的配置如下

spring
  thymeleaf:
    cache: false

接着就可以在template下写thymeleaf了

你可能感兴趣的:(SpringBoot)