idea中springboot配置热部署

  1.pom.xml配置依赖:

<!-- 热部署插件 -->
<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-devtools</artifactId>
   <optional>true</optional>
</dependency>
2.File->setting->搜索compiler->将Build project automatically打勾
(注意后面only works not running/debugging,如果要实现热部署就必须打破这个限制)

3.CTRL+ALT+SHIFT+/ 组合键打开 Maintenance窗口选择Registry... ,

找到compiler.automake.allow.when.app.running选项,打勾开启运行时编译功能

从此以后!修改Java代码就不需要重新部署啦!


猜你喜欢

转载自blog.csdn.net/debugbugbg/article/details/80793920