热部署设置

项目发布要关闭热部署

1.

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <scope>runtime</scope>
    <optional>true</optional>
</dependency>

2.

<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>

3.

4. Ctrl+shift+Alt+/

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
设置idea 2022的热部署,你可以按照以下步骤进行操作: 1. 在项目的pom.xml文件中添加以下配置: ``` <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency> ``` 这样可以引入spring-boot-devtools依赖。 2. 在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> ``` 这个配置会为项目添加spring-boot-maven-plugin插件。 3. 打开IntelliJ IDEA,点击菜单栏的“File”,选择“Settings”(或者是“Preferences”),然后在弹出的窗口中找到“Compiler”选项。 4. 在“Compiler”选项卡下,找到“Build Project Automatically”选项,确保它被勾选上。这样每次修改代码后,项目会自动重新构建。 5. 在同一个窗口中,找到“Build, Execution, Deployment”选项,展开它并选择“Compiler”子选项。 6. 在右侧的窗格中,找到“Build process heap size”选项,可以根据需要调整Java编译过程的堆大小。 7. 点击“Apply”或“OK”保存设置。 通过以上步骤,你就可以在idea 2022中进行热部署设置了,这样在修改代码后,项目会自动重新构建并部署,无需手动重启应用。引用 引用<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [springboot开启自动部署devtools](https://blog.csdn.net/zuodaoyong/article/details/108904381)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [Idea配置热部署的详细教程](https://download.csdn.net/download/weixin_38554193/12723427)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [基于IDEA+Maven+SSM框架+mysql的高并发的商品秒杀项目](https://download.csdn.net/download/qq_35831906/88227624)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值