jar包简单加密———第一章:classfinal

              <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

 
posted @ 2023-01-06 13:52  ExpectoPatronum—S  阅读(619)  评论(0编辑  收藏  举报