idea配置SpringBoot的热部署

几个关键的地方:

1、pom文件中添加热部署的依赖

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

2、配置文件resources/application.properties中添加对devtools的配置

#热部署生效
spring.devtools.restart.enabled=true

3、配置idea自动编译项目

a、配置编译器自动构建项目


b、允许app运行的时候自动编译项目。

ctrl + shift + alt + /,选择Registry,勾上 Compiler autoMake allow when app running。




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
配置Spring Boot热部署,你可以按照以下步骤进行操作: 1. 在你的项目的pom.xml文件中,添加spring-boot-devtools的依赖,并确保在<optional>标签中设置为true。这样可以确保在开发阶段使用热部署功能。 2. 在maven-plugin上添加配置,以支持热部署。同时,确保修改IDEA设置,打开自动编译,并允许在程序运行过程中进行编译。 3. 修改spring-boot-maven-plugin插件的配置,设置<fork>标签为true。这样可以确保在重新启动应用程序时,使用新的类加载器加载修改后的类。 通过以上步骤,你就可以成功配置IDEA实现Spring Boot热部署的功能了。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [【SpringBoot学习】2、idea 配置 SpringBoot 热启动详解,和热启动失效解决方案](https://blog.csdn.net/qq_38762237/article/details/81094425)[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: 50%"] - *2* [SpringBoot设置热部署(超详细)【IDEA版】](https://blog.csdn.net/weixin_43883917/article/details/115398023)[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: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值