使用SpringBoot开发大家都知道,修改完程序之后 需要手动点击一下重启,然后才能测试,那么就比较麻烦了;其实idea有热加载插件,修改之后及时生效,温馨提示:电脑配置不高不要使用了...
在pom.xml文件 添加依赖
dependency> org.springframework.boot spring-boot-devtools true
在applicatoin.yml配置文件中增加
spring: thymeleaf: cache=true: true // devtools: restart: enabled=true: true additional-paths: src/ // 代表那个目录里的内容被修改了就自动重启
#不生效的问题:
第一个操作,请勾选红色部分
![b00bbbdb2433b57f599e323f6712b9fc.png](https://img-blog.csdnimg.cn/img_convert/b00bbbdb2433b57f599e323f6712b9fc.png)
第二个操作
ctrl+shit+alt+/
选择registory
勾选红色的部分
![601d381b826b41384918df9b1f50b8e5.png](https://img-blog.csdnimg.cn/img_convert/601d381b826b41384918df9b1f50b8e5.png)
温馨提示:2019版本的idea;2020版本不清楚是否有改动该部分