SpringBoot项目使用JRebel热部署
2017-05-30 本文已影响464人
罗曼蒂克
工作中,提升效率,是必不可少的:
花更少的时间,做更多的事
jRebel跟我说
2017-05-30 17:22:37 JRebel:
2017-05-30 17:22:37 JRebel: Over the last 30 days JRebel prevented
2017-05-30 17:22:37 JRebel: at least 3 redeploys/restarts saving you about 0.1 hours.
2017-05-30 17:22:37 JRebel:
2017-05-30 17:22:37 JRebel: Over the last 134 days JRebel prevented
2017-05-30 17:22:37 JRebel: at least 613 redeploys/restarts saving you about 24.9 hours.
2017-05-30 17:22:37 JRebel:
节约了25个小时🤣o((⊙﹏⊙))o.o((⊙﹏⊙))o.
闲言少叙,先看效果图

所需资源
- Idea
- JRebel
思路
设置代码自动编> JRebel监控编译输入目录
步骤
一. Idea中command+shift+a 调出

二. 输入registry 进入如下界面

三. 将compiler.automake.allow.when.app.running 选中,退出该界面
四. 在项目的src/resources文件夹右键,弹出菜单最下边JReble>rebel.xml

五. 打开刚刚生成的rebel.xml文件,将classpath dir修改到你项目的build文件夹

六. 在启动类中右键,使用Jrebel Debug进行启动

至此,你可以去测试一下啦
最后,如果生效,可以设置idea

如果是mybatis的SQL文件xml,可以每次Ctrl+f9更新