困扰,在开发阶段每次修改代码都要手动去重新启动程序,热加载能简单粗暴帮我们去掉这一繁琐的动作,提高开发效率。
热部署:是指在对项目JAVA类进行了修改在不重启WEB服务器前提下能让修改生效
在IDEA中配置springboot热加载
1.File --> Settings --> Build-Execution-Deployment --> Compiler,
勾选 Build project automatically,如下图

2.点击 Help --> Find Action..,或使用快捷键 Ctrl+Shift+A来打开 Registry...,
勾选compiler.automake.allow.when.app.running,如下图

3.在springboot项目pom.xml文件中添加以下 dependency

配置完毕,重启IDEA,现在在开发阶段你就不必每次都手动的去点停止和启动了
网友评论