参考资料:
http://zjumty.iteye.com/blog/2197484
学习spring boot踩过的坑,已经跳出了,下面告诉大家怎么跳:
开发环境:
IntelliJ IDEA 、JDK1.8
源码:https://github.com/wyyl1/android-code-generator
这是一个自动生成Android代码的项目,刚开始开发。
1、阅读官方文档:https://spring.io/guides/gs/serving-web-content/
2、下载官方Demo:https://github.com/spring-guides/gs-serving-web-content.git
3、用IntelliJ IDEA导入gs-serving-web-content工程
4、运行起来后,发现在修改html文件后刷新浏览器没有反映!
上网搜索,得到配置spring.thymeleaf.cache=false可以解决问题。问题是:application.properties文件在哪?
5、成功配置spring.thymeleaf.cache后刷新页面依然没有反映,为什么呢?
搜索后得到答案:按Ctrl+F9重新编译后就可以了,结果还是不行啊,后来发现windows系统是按CTRL+Shift+F9
这样就可以了,但还是不知道怎么通过gradle配置hotswap,祝大家迅速解决问题!