idea设置springboot热部署

debug状态下更改代码,重启很费时间,设置热编译部署是很有用的.

套路开始:------>>

第一步

idea设置springboot热部署

第二步

Compiler设置自动编译

idea设置springboot热部署

 

第三步

Shift+ctrl+alt+/

选择registry

idea设置springboot热部署

idea设置springboot热部署

 

第六步

设置debug状态自动重载类,保证能够不重启整个项目就将更改的功能加到项目中去。

idea设置springboot热部署

最后一步,修改代码之后记得点击编译,然后修改的代码就可以使用了.

idea设置springboot热部署

 

ps: 当使用springcloud搭建项目是,点击上面的编译按钮会编译整个springcloud项目,但是项目中一些模块可以不考虑,不去编译它,只对我们当前开发的模块编译就行了,这时候,我们需要鼠标选中模块,右键选择Build Module就行了

idea设置springboot热部署

嗯,就是这样了.