IDEA2022版本设置热部署

1、开启IDEA的自动编译(静态)
具体步骤:打开顶部工具栏 File -> Settings -> Build,Execution,Deployment -> Compiler 然后勾选 Build project automatically 。

2、 开启IDEA的自动编译(动态)
具体步骤:打开顶部工具栏 File -> Settings -> Advanced Settings -> Compiler -> 然后勾选 Allow auto-make to start even if developed application is currently running。
3、开启IDEA的热部署策略(非常重要)
具体步骤:点击Edit COnfigurations…进入

 

 选择Modif options -> On ‘Updata’ actrion -> Update classes and resources

4、在pom.xml文件中导入热部署插件

1.添加plugin到pom.xml
复制代码

复制代码
<build>
    <plugins>
        <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
          <fork>true</fork>
          <addResources>true</addResources>
        </configuration>
      </plugin>
    </plugins>
 </build>
```java
复制代码

 这里使用的是微服务框架 ,可能还需要其他配置吧,也不清楚,热更新没效果

posted @   study_php_java_C++  阅读(704)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
点击右上角即可分享
微信分享提示