1、classFinal插件
注:貌似智能加密原生java开发出来的类。
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>net.roseboy</groupId>
<artifactId>classfinal-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<password>#</password>
<packages>com.ruoyi.system</packages>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>classFinal</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
java -javaagent:ai_downcar_core-2.0-release-encrypted.jar -jar ai_downcar-2.0-release.jar
将加密后的war放在tomcat/webapps下, tomcat/bin/catalina 增加以下配置:
//linux下 catalina.sh
CATALINA_OPTS="$CATALINA_OPTS -javaagent:classfinal-fatjar.jar='-pwd 0000000'";
export CATALINA_OPTS;
//win下catalina.bat
set JAVA_OPTS="-javaagent:classfinal-fatjar.jar='-pwd 000000'"
//参数说明
// -pwd 加密项目的密码
// -nopwd 无密码加密时启动加上此参数,跳过输密码过程
// -pwdname 环境变量中密码的名字
idea启动增加vm参数
2、另一个插件proguard
https://mp.weixin.qq.com/s/wLtaMU2VgB730fA2fi_qiQ
标签:混淆,catalina,加密,jar,CATALINA,java,OPTS From: https://www.cnblogs.com/stubborn-dude/p/17696958.html