springboot|springboot 项目热部署

  1. pom文件

    org.springframework.boot
    spring-boot-devtools
    true



org.springframework.boot
spring-boot-maven-plugin

true//该配置必须




  1. 设置idea的设置

    springboot|springboot 项目热部署
    文章图片
    image.png
  2. mac 是command+option+shift+/弹出 选择Registry中的,勾选上

    springboot|springboot 项目热部署
    文章图片
    image.png
  3. 重启idea
浏览器缓存
F12(或Ctrl+Shift+J或Ctrl+Shift+I)--> NetWork --> Disable Cache(while DevTools is open)
springboot|springboot 项目热部署
文章图片
image.png
【springboot|springboot 项目热部署】但是这些对于ftl文件没有用,最后的解决办法为:在target中修改对应的文件,即可达到实时修改

    推荐阅读