zl程序教程

您现在的位置是:首页 >  后端

当前栏目

SpringBoot 配置热部署详解编程语言

2023-06-13 09:20:41 时间

做个记录,以免忘记:

1. 在 pom.xml 文件中的 dependencies 标签以内添加组件 devtools,具体内容如下:

1 !-- SpringBoot 热部署组件 devtools -- 

2 dependency 

3 groupId org.springframework.boot /groupId 

4 artifactId spring-boot-devtools /artifactId 

5 scope provided /scope 

6 optional true /optional 

7 /dependency 

2. plugins 标签以内添加组件 maven-plugin,具体内容如下:

1 plugin 

2 groupId org.springframework.boot /groupId 

3 artifactId spring-boot-maven-plugin /artifactId 

4 configuration 

5 fork true /fork 

6 /configuration 

7 /plugin 

然后就可以不用手动重新启动服务了,修改代码之后它会自动重启。

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/13964.html

cjavaxml