pom.xml

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

 

spring.thymeleaf.cache=false # 这个是配置模板路径的,默认就是templates,可不用配置 spring.thymeleaf.prefix=classpath:/templates/

spring.thymeleaf.mode=HTML5

这个开发配置为false,避免改了模板还要重启服务器

spring.thymeleaf.cache=false

 

 

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>
 

springboot集成thymeleaf

 

 

 

相关文章:

  • 2021-07-16
  • 2022-12-23
  • 2022-01-11
  • 2021-11-18
  • 2021-10-25
  • 2019-02-10
  • 2022-12-23
猜你喜欢
  • 2020-01-14
  • 2021-08-22
  • 2022-12-23
  • 2022-01-19
相关资源
相似解决方案