JRebel在maven中多模块的配置。;
- pom.xml配置
1.查看内核版本(Docker需要64位版本,同时内核版本在3.10以上,如果版本低于3.10,需要升级内核):
1 | <!--JRebel的配置--> |
- 生成rebel.xml
然后在 maven-helper
的插件中 jrebel generator
生成 rebel.xml
文件。
- 配置自动编译
1.Go to File -> Settings -> Build, Execution, Deployment -> Compiler
勾选 build project automatically
,如果拥有更大的内存的话,你还可以继续勾选 Compile independent modules in parallel
以加快编译。
配图:
2.Registry action window
1 | Open the Action window : |
配图:
- 运行命令
使用 run JRebel
来运行程序即可
- 修改文件
如果我修改了 VoUtilResource
这个类,那么 console
中会出现以下提示:
如果配置正确会出现2017-07-03 20:33:34 JRebel: Reloading class ‘com.xx.xx.rest.resource.VoUtilResource’.
配图