了方便每次修改HTML文件都能实时刷新,做一下更改。

在application.properties文件加入以下命令:

#thymeleaf start
spring.thymeleaf.mode=HTML5
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.content-type=text/html
#开发时关闭缓存,不然没法看到实时页面
spring.thymeleaf.cache=false
#thymeleaf end

打开IDEA->File->setting,勾选自动编译
Thymeleaf -自动编译设置
Thymeleaf -自动编译设置

然后重启项目,更改HTML文件后ctrl+s保存后,刷新页面即可看到更新。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
  • 2021-11-25
  • 2021-06-15
  • 2022-12-23
猜你喜欢
  • 2022-01-07
  • 2021-10-01
  • 2021-12-16
  • 2022-12-23
相关资源
相似解决方案