springboot整合thymeleaf

1. 在pom文件中引入依赖



    org.springframework.boot
    spring-boot-starter-thymeleaf

2. 在application.properties配置文件中可以添加相应的配置

#thymeleaf
#关闭模板缓存
spring.thymeleaf.cache=false 
spring.thymeleaf.servlet.content-type=text/html

3. 使用IDEA,修改html文件,否则会检测thymeleaf语法报语法错误,但是可以正常运行

//需要被修改的部分



//修改后的代码


你可能感兴趣的:(springboot整合thymeleaf)