jebe

任务要求

修改配置文件后不用重新启动项目便能重新编译代码

过程

搜索的过程中发现了jrebel这个插件,功能很强大,不过不是免费的,有破解版的教程,没有成功,后来发现可以使用30天,过期了在换个账号重新申请一个就好了,就安装了线上的体验版本.如果细心观察可以发现在idea的settings里面就有这个jrebel的相关配置

安装

第一步
这里写图片描述

第二步
这里写图片描述

第三步
这里写图片描述

第四步
这里写图片描述

第五步,安装插件完成后会如下图
这里写图片描述

第六步
这里写图片描述

第七步,必须是带export
这里写图片描述

第八步,让各个地方的改动都能自动编译插入下面的插件,在父pom中


<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<version>1.1.5</version>
<configuration>
<addResourcesDirToRebelXml>true</addResourcesDirToRebelXml>
<alwaysGenerate>true</alwaysGenerate>
<showGenerated>true</showGenerated>
</configuration>
<executions>
<execution>
<id>generate-rebel-xml</id>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

最后运行的时候用第五步显示的那俩个小图标

猜你喜欢

转载自blog.csdn.net/ljm15832631631/article/details/79604767