Spring Boot热部署配置过程

1.引入依赖:

         首先,在pom.xml中引入spring-boot-devtools模块,然后新增<fork>配置项,修改其值为true开启热部署。具体过程如下图1-1所示。

                                                                                        图 1-1

 2.设置IDEA:

(1)、点击File,选择Settings选项,然后找到Build、Execution、Deployment,选中其下的Compiler选项,然后将Build project automatically选中,确定。具体操作如下图2-1所示。

                                                                                        图 2-1 

(2)、通过快捷键Ctrl+Shift+A,查找到Registry,然后将其下的键compiler.automake.allow.when.app.running的值修改为选中状态。具体操作如下图2-2所示。

                                                                                        图 2-2

(3)、重新启动IDEA,完成热部署配置。

猜你喜欢

转载自blog.csdn.net/weixin_38974419/article/details/88869868