idea配置热部署

2020-06-30  本文已影响0人  嗷嗷叫的多多
  1. pom.xml中添加依赖
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
    <scope>true</scope>
</dependency>
  1. pom.xml中配置热部署
<!--热部署配置-->
<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
    <!--fork :  如果没有该项配置,肯定devtools不会起作用,即应用不会restart -->
    <fork>true</fork>
    </configuration>
</plugin>
  1. File --> Settings --> Build , Execution , Deployment --> Compiler --> Build project automatically 勾选然后保存
  2. CTRL+ALT+SHIFT+/ 组合键打开 Maintenance窗口选择Registry... ,找到compiler.automake.allow.when.app.running选项勾选

https://blog.csdn.net/qq_41771222/article/details/82623619

上一篇 下一篇

猜你喜欢

热点阅读