先说明下idea版本:
百度过Spring boot热部署应该都知道怎么配置了,但结果还是无效的话再往下看, 不想知道原因的直接拉到最下看红字 :
Spring boot热部署的条件:
- setting –> compiler 将 Build project automatically 勾选上
- alt + shift + a 搜索 registry 选第一个,弹出框后下拉找到 compiler.automake.allow.when.app.running 勾选上即可。
两者必须满足才能生效,但run之后却无法热部署,仔细看看Build project automatically
这下明白了吧,需要 debug启动 才能热部署,坑!!