美文网首页
springboot 项目热部署

springboot 项目热部署

作者: 喵渺汪忘 | 来源:发表于2020-04-15 10:26 被阅读0次
  1. pom文件
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
    </dependency>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>//该配置必须
</configuration>
</plugin>
</plugins>
</build>

  1. 设置idea的设置


    image.png
  2. mac 是command+option+shift+/弹出 选择Registry中的,勾选上


    image.png
  3. 重启idea

浏览器缓存
F12(或Ctrl+Shift+J或Ctrl+Shift+I)--> NetWork --> Disable Cache(while DevTools is open)

image.png

但是这些对于ftl文件没有用,最后的解决办法为:在target中修改对应的文件,即可达到实时修改

相关文章

网友评论

      本文标题:springboot 项目热部署

      本文链接:https://www.haomeiwen.com/subject/lemqvhtx.html