1、复制代码到最大的pom.xml的plugins标签下,多模块工程需要有这一步,非多模块工程不需要
<plugin> <groupId>org.zeroturnaround</groupId> <artifactId>jrebel-maven-plugin</artifactId> <version>1.1.8</version> <configuration> <!-- 将配置的资源目录也添加到rebel.xml中 --> <addResourcesDirToRebelXml>true</addResourcesDirToRebelXml> <!--如果设置为true,则生成的rebel.xml将在构建期间在控制台中打印出来,可以立即看到生成的内容。默认为false--> <showGenerated>true</showGenerated> <!-- 每次都生成新的rebel.xml。如果为false,只在rebel.xml和pom.xml的时间戳不相同的时候,重新生成rebel.xml。默认为false --> <!--<alwaysGenerate>true</alwaysGenerate>--> <!-- 在单个项目中处理多个模块时,您可以选择跳过为特定模块生成rebel.xml。 只需将以下内容添加到他们的pom.xml中即可 --> <!--<skip>true</skip>--> <!-- 如果工程师自己自定义的package,则需要主动设置为 jar 或者 war --> <!--<packaging>war</packaging>--> </configuration> <executions> <execution> <id>generate-rebel-xml</id> <phase>process-resources</phase> <goals> <goal>generate</goal> </goals> </execution> </executions> </plugin> |
2、先安装插件,点击菜单栏File->Settings->Plugins
3、搜索Jrebel
4、重启
5、进去Settings,有个新选项Jrebel & XRebel
6、验证,如图
https://www.zpjeck.top/jrebel/518dc87d-b942-4369-a635-323cfc81d0e1
7、配置项目,File->Project Structure,选择Project选项卡,编译输出目录选择run模块的targer目录
8、配置tomcat
9、配置自动编译,进入File->Settings->Build,Execution...->Compiler
10、最后点击Jerebel Debug启动,
11、每次改动代码后Ctrl+Shift+F9,提示reloaded
我的笔记博客版权
我的笔记博客版权