SpringBoot设置热部署(超详细)【IDEA版】
SpringBoot开始热部署(超详细)
- 1、添加devtools的依赖
- 2在maven-plugin上添加configration
- 3、修改idea的设置,打开自动编译
- 4、修改idea的设置允许在程序运行过程中编译
1、添加devtools的依赖
<!--devtools-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
2在maven-plugin上添加configration
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
3、修改idea的设置,打开自动编译
4、修改idea的设置允许在程序运行过程中编译
快捷键键:CTRL+SHIFT+ALT+/
这样设置后,只要我们修改完代码,并且鼠标失去焦点(鼠标移开)后,这样idea就会自动编译并且springboot就会重新部署,不用手动操作了。
以上就是SpringBoot设置热部署(超详细)【IDEA版】的全部内容。
看完如果对你有帮助,感谢点赞支持!
如果你是电脑端的话,看到右下角的 “一键三连” 了吗,没错点它[哈哈]
加油!
共同努力!
Keafmd
还没有评论,来说两句吧...