SpringBoot+thymeleaf不重启修改html

如何不重启程序修改html

阅读 21.2k
4 个回答

如果使用的开发工具是 idea ,修改 html 后使用 Ctrl + Shift + F9.

spring.thymeleaf.cache 设为false
或者使用springboot的devtools

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <version>1.3.0.RELEASE</version>
</dependency>
新手上路,请多包涵

spring.thymeleaf.cache=false

新手上路,请多包涵

SpringBoot启动的时候会自动启动一个liveReload服务,你可以在火狐/chrome里可以找到liveReload插件,然后你改了html/css/js之后页面会自动刷新,不用重新部署,不过装这个插件要科学一下好像

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题