<plugin> <groupId>net.roseboy</groupId> <artifactId>classfinal-maven-plugin</artifactId> <version>1.2.1</version> <configuration> <password>#</password><!--加密打包之后pom.xml会被删除,#号代表不适用密码,--> <packages>com.xxx.xxx</packages> <cfgfiles>application.yml</cfgfiles> <excludes>org.spring</excludes>
<!--需要加密依赖的lib包--> <libjars>com-xxx-xxx-0.0.1.jar,b.jar</libjars> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>classFinal</goal> </goals> </execution> </executions> </plugin>
不加密启动方式:
java -javaagent:yourpaoject-encrypted.jar -jar yourpaoject-encrypted.jar
参考官方文档:
https://gitee.com/roseboy/classfinal
标签:加密,xxx,jar,yourpaoject,简单,com,roseboy From: https://www.cnblogs.com/gjths/p/17030227.html