混淆配置,所有的包增加classifier为xj,只对biz包混淆,混淆后classifier为obf,profile配置写好,混淆打包时勾选biz-obf+default打包,不混淆时只勾选default
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
|
||||
<!-- feign -->
|
||||
|
||||
@@ -13,18 +13,22 @@
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-consultation-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-emergency-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-im-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-cloud-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -50,4 +54,21 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>biz-obf</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.wvengen</groupId>
|
||||
<artifactId>proguard-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
-keepattributes *Annotation*, Signature, InnerClasses, EnclosingMethod, Exceptions
|
||||
-keep @org.springframework.stereotype.Service class *
|
||||
-keep @org.springframework.web.bind.annotation.RestController class *
|
||||
-keep @org.springframework.context.annotation.Configuration class *
|
||||
-keep @org.springframework.stereotype.Component class *
|
||||
-keepclassmembers enum * { # 保留枚举结构
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
-keepclassmembers class * implements java.io.Serializable { # 保留序列化类
|
||||
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
||||
private void writeObject(java.io.ObjectOutputStream);
|
||||
private void readObject(java.io.ObjectInputStream);
|
||||
}
|
||||
-keepclassmembers class * {
|
||||
@org.springframework.web.bind.annotation.*Mapping *;
|
||||
}
|
||||
-keepclassmembers class * {
|
||||
private static synthetic java.lang.Object $deserializeLambda$(java.lang.invoke.SerializedLambda);
|
||||
}
|
||||
-keep class lombok.** { *; }
|
||||
-keepclassmembers class * {
|
||||
@lombok.Getter *;
|
||||
@lombok.Setter *;
|
||||
}
|
||||
# MyBatis 专用保留规则
|
||||
-keep interface com.renkang.**.mapper.** { *; }
|
||||
-keepclassmembers class com.renkang.**.entity.** { *; }
|
||||
|
||||
|
||||
# 关闭优化和压缩(避免框架兼容性问题)
|
||||
-dontshrink # 不删除未使用代码
|
||||
-dontoptimize # 不优化字节码[5,6](@ref)
|
||||
-keepdirectories
|
||||
-dontusemixedcaseclassnames
|
||||
-adaptclassstrings
|
||||
# 混淆选项
|
||||
-useuniqueclassmembernames # 成员名称唯一化
|
||||
-ignorewarnings
|
||||
@@ -9,6 +9,11 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>health-consultation-start</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.install.skip>true</maven.install.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!--微服务启动 starter-->
|
||||
<dependency>
|
||||
@@ -24,6 +29,7 @@
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-consultation-biz</artifactId>
|
||||
<classifier>${biz-classifier}</classifier>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
<version>2.0.0</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<maven.install.skip>true</maven.install.skip>
|
||||
</properties>
|
||||
|
||||
<!--项目子模块-->
|
||||
<modules>
|
||||
<module>health-consultation-api</module>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
|
||||
<!-- feign -->
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>health-emergency-biz</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<!--定时任务-->
|
||||
<dependency>
|
||||
@@ -18,15 +19,18 @@
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-emergency-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-cloud-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-im-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
@@ -47,4 +51,21 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>biz-obf</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.wvengen</groupId>
|
||||
<artifactId>proguard-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
-keepattributes *Annotation*, Signature, InnerClasses, EnclosingMethod, Exceptions
|
||||
-keep @org.springframework.stereotype.Service class *
|
||||
-keep @org.springframework.web.bind.annotation.RestController class *
|
||||
-keep @org.springframework.context.annotation.Configuration class *
|
||||
-keep @org.springframework.stereotype.Component class *
|
||||
-keepclassmembers enum * { # 保留枚举结构
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
-keepclassmembers class * implements java.io.Serializable { # 保留序列化类
|
||||
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
||||
private void writeObject(java.io.ObjectOutputStream);
|
||||
private void readObject(java.io.ObjectInputStream);
|
||||
}
|
||||
-keepclassmembers class * {
|
||||
@org.springframework.web.bind.annotation.*Mapping *;
|
||||
}
|
||||
-keepclassmembers class * {
|
||||
private static synthetic java.lang.Object $deserializeLambda$(java.lang.invoke.SerializedLambda);
|
||||
}
|
||||
-keep class lombok.** { *; }
|
||||
-keepclassmembers class * {
|
||||
@lombok.Getter *;
|
||||
@lombok.Setter *;
|
||||
}
|
||||
# MyBatis 专用保留规则
|
||||
-keep interface com.renkang.**.mapper.** { *; }
|
||||
-keepclassmembers class com.renkang.**.entity.** { *; }
|
||||
|
||||
|
||||
# 关闭优化和压缩(避免框架兼容性问题)
|
||||
-dontshrink # 不删除未使用代码
|
||||
-dontoptimize # 不优化字节码[5,6](@ref)
|
||||
-keepdirectories
|
||||
-dontusemixedcaseclassnames
|
||||
-adaptclassstrings
|
||||
# 混淆选项
|
||||
-useuniqueclassmembernames # 成员名称唯一化
|
||||
-ignorewarnings
|
||||
@@ -9,6 +9,11 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>health-emergency-start</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.install.skip>true</maven.install.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!--微服务启动 starter-->
|
||||
<dependency>
|
||||
@@ -20,6 +25,7 @@
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-emergency-biz</artifactId>
|
||||
<classifier>${biz-classifier}</classifier>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
<version>2.0.0</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<maven.install.skip>true</maven.install.skip>
|
||||
</properties>
|
||||
|
||||
<!--项目子模块-->
|
||||
<modules>
|
||||
<module>health-emergency-api</module>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -9,14 +9,17 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>health-im-biz</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-im-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-cloud-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<!--腾讯云即时对话pom-->
|
||||
<dependency>
|
||||
@@ -35,6 +38,7 @@
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-consultation-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
@@ -54,4 +58,21 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>biz-obf</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.wvengen</groupId>
|
||||
<artifactId>proguard-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
-keepattributes *Annotation*, Signature, InnerClasses, EnclosingMethod, Exceptions
|
||||
-keep @org.springframework.stereotype.Service class *
|
||||
-keep @org.springframework.web.bind.annotation.RestController class *
|
||||
-keep @org.springframework.context.annotation.Configuration class *
|
||||
-keep @org.springframework.stereotype.Component class *
|
||||
-keepclassmembers enum * { # 保留枚举结构
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
-keepclassmembers class * implements java.io.Serializable { # 保留序列化类
|
||||
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
||||
private void writeObject(java.io.ObjectOutputStream);
|
||||
private void readObject(java.io.ObjectInputStream);
|
||||
}
|
||||
-keepclassmembers class * {
|
||||
@org.springframework.web.bind.annotation.*Mapping *;
|
||||
}
|
||||
-keepclassmembers class * {
|
||||
private static synthetic java.lang.Object $deserializeLambda$(java.lang.invoke.SerializedLambda);
|
||||
}
|
||||
-keep class lombok.** { *; }
|
||||
-keepclassmembers class * {
|
||||
@lombok.Getter *;
|
||||
@lombok.Setter *;
|
||||
}
|
||||
# MyBatis 专用保留规则
|
||||
-keep interface com.renkang.**.mapper.** { *; }
|
||||
-keepclassmembers class com.renkang.**.entity.** { *; }
|
||||
|
||||
|
||||
# 关闭优化和压缩(避免框架兼容性问题)
|
||||
-dontshrink # 不删除未使用代码
|
||||
-dontoptimize # 不优化字节码[5,6](@ref)
|
||||
-keepdirectories
|
||||
-dontusemixedcaseclassnames
|
||||
-adaptclassstrings
|
||||
# 混淆选项
|
||||
-useuniqueclassmembernames # 成员名称唯一化
|
||||
-ignorewarnings
|
||||
@@ -9,6 +9,11 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>health-im-start</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.install.skip>true</maven.install.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!--微服务启动 starter-->
|
||||
<dependency>
|
||||
@@ -20,6 +25,7 @@
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-im-biz</artifactId>
|
||||
<classifier>${biz-classifier}</classifier>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
<version>2.0.0</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<maven.install.skip>true</maven.install.skip>
|
||||
</properties>
|
||||
|
||||
<!--项目子模块-->
|
||||
<modules>
|
||||
<module>health-im-api</module>
|
||||
|
||||
@@ -24,11 +24,19 @@
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-consultation-api</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-consultation-biz</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-consultation-biz</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>obf</classifier>
|
||||
</dependency>
|
||||
|
||||
<!-- emergency 应急模块-->
|
||||
@@ -36,11 +44,19 @@
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-emergency-api</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-emergency-biz</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-emergency-biz</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>obf</classifier>
|
||||
</dependency>
|
||||
|
||||
<!-- IM IM通信模块-->
|
||||
@@ -48,11 +64,19 @@
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-im-api</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-im-biz</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-im-biz</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>obf</classifier>
|
||||
</dependency>
|
||||
|
||||
<!-- watch 手表模块-->
|
||||
@@ -60,23 +84,33 @@
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-watch-api</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-watch-biz</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-watch-biz</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>obf</classifier>
|
||||
</dependency>
|
||||
<!-- modules 组件-->
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>data-center-api</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>font-resources</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
|
||||
<!-- starter -->
|
||||
@@ -84,16 +118,19 @@
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>renkang-starter-batch</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>renkang-starter-aspose-word</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>renkang-test</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
|
||||
@@ -10,26 +10,32 @@
|
||||
</parent>
|
||||
|
||||
<artifactId>health-watch-biz</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-watch-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-emergency-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-cloud-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>renkang-starter-batch</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>data-center-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -39,6 +45,7 @@
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>renkang-starter-aspose-word</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
@@ -55,6 +62,7 @@
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>font-resources</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
@@ -74,5 +82,21 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>biz-obf</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.wvengen</groupId>
|
||||
<artifactId>proguard-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
-keepattributes *Annotation*, Signature, InnerClasses, EnclosingMethod, Exceptions
|
||||
-keep @org.springframework.stereotype.Service class *
|
||||
-keep @org.springframework.web.bind.annotation.RestController class *
|
||||
-keep @org.springframework.context.annotation.Configuration class *
|
||||
-keep @org.springframework.stereotype.Component class *
|
||||
-keepclassmembers enum * { # 保留枚举结构
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
-keepclassmembers class * implements java.io.Serializable { # 保留序列化类
|
||||
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
||||
private void writeObject(java.io.ObjectOutputStream);
|
||||
private void readObject(java.io.ObjectInputStream);
|
||||
}
|
||||
-keepclassmembers class * {
|
||||
@org.springframework.web.bind.annotation.*Mapping *;
|
||||
}
|
||||
-keepclassmembers class * {
|
||||
private static synthetic java.lang.Object $deserializeLambda$(java.lang.invoke.SerializedLambda);
|
||||
}
|
||||
-keep class lombok.** { *; }
|
||||
-keepclassmembers class * {
|
||||
@lombok.Getter *;
|
||||
@lombok.Setter *;
|
||||
}
|
||||
# MyBatis 专用保留规则
|
||||
-keep interface com.renkang.**.mapper.** { *; }
|
||||
-keepclassmembers class com.renkang.**.entity.** { *; }
|
||||
|
||||
|
||||
# 关闭优化和压缩(避免框架兼容性问题)
|
||||
-dontshrink # 不删除未使用代码
|
||||
-dontoptimize # 不优化字节码[5,6](@ref)
|
||||
-keepdirectories
|
||||
-dontusemixedcaseclassnames
|
||||
-adaptclassstrings
|
||||
# 混淆选项
|
||||
-useuniqueclassmembernames # 成员名称唯一化
|
||||
-ignorewarnings
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
<artifactId>health-watch-start</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.install.skip>true</maven.install.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!--微服务启动 starter-->
|
||||
<dependency>
|
||||
@@ -22,11 +26,13 @@
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-watch-biz</artifactId>
|
||||
<classifier>${biz-classifier}</classifier>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>renkang-test</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -20,8 +20,4 @@
|
||||
<version>2.0.0</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<maven.install.skip>true</maven.install.skip>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-cloud-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -20,10 +20,12 @@
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-consultation-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-local-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
@@ -79,8 +81,25 @@
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-watch-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>biz-obf</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.wvengen</groupId>
|
||||
<artifactId>proguard-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
-keepattributes *Annotation*, Signature, InnerClasses, EnclosingMethod, Exceptions
|
||||
-keep @org.springframework.stereotype.Service class *
|
||||
-keep @org.springframework.web.bind.annotation.RestController class *
|
||||
-keep @org.springframework.context.annotation.Configuration class *
|
||||
-keep @org.springframework.stereotype.Component class *
|
||||
-keepclassmembers enum * { # 保留枚举结构
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
-keepclassmembers class * implements java.io.Serializable { *; }
|
||||
-keepclassmembers class * {
|
||||
@org.springframework.web.bind.annotation.*Mapping *;
|
||||
}
|
||||
-keepclassmembers class * {
|
||||
private static synthetic java.lang.Object $deserializeLambda$(java.lang.invoke.SerializedLambda);
|
||||
}
|
||||
-keep class lombok.** { *; }
|
||||
-keepclassmembers class * {
|
||||
@lombok.Getter *;
|
||||
@lombok.Setter *;
|
||||
}
|
||||
# MyBatis 专用保留规则
|
||||
-keep interface org.jeecg.**.mapper.** { *; }
|
||||
-keepclassmembers class org.jeecg.**.entity.** { *; }
|
||||
-dontwarn org.jeecg.**.entity.**
|
||||
|
||||
# 关闭优化和压缩(避免框架兼容性问题)
|
||||
-dontshrink # 不删除未使用代码
|
||||
-dontoptimize # 不优化字节码[5,6](@ref)
|
||||
-keepdirectories
|
||||
-dontusemixedcaseclassnames
|
||||
-adaptclassstrings
|
||||
# 混淆选项
|
||||
-useuniqueclassmembernames # 成员名称唯一化
|
||||
-ignorewarnings
|
||||
@@ -11,6 +11,10 @@
|
||||
<artifactId>jeecg-system-start</artifactId>
|
||||
<description>System项目微服务启动</description>
|
||||
|
||||
<properties>
|
||||
<maven.install.skip>false</maven.install.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- 引入jeecg-boot-starter-cloud依赖 -->
|
||||
<dependency>
|
||||
@@ -21,6 +25,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-biz</artifactId>
|
||||
<classifier>${biz-classifier}</classifier>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
<artifactId>jeecg-system</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<maven.install.skip>true</maven.install.skip>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
<module>jeecg-system-api</module>
|
||||
<module>jeecg-system-biz</module>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<biz-classifier>xj</biz-classifier>
|
||||
<!-- 基础配置 -->
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
@@ -257,6 +258,13 @@
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-biz</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-biz</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>obf</classifier>
|
||||
</dependency>
|
||||
|
||||
<!-- jeecg tools -->
|
||||
@@ -270,18 +278,21 @@
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
<version>${jeecgboot-renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<!-- system 单体 api -->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-local-api</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<!-- system 微服务 api -->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-cloud-api</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
|
||||
<!--微服务启动依赖-->
|
||||
@@ -646,6 +657,13 @@
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<classifier>xj</classifier> <!-- 设置classifier -->
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 指定JDK编译版本 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
@@ -728,12 +746,91 @@
|
||||
<configuration>
|
||||
<!--设置为true,以便把本地的system的jar也包括进来-->
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
<!-- 可选:为可执行包设置新 classifier -->
|
||||
<classifier>xj</classifier>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>biz-obf</id>
|
||||
<properties>
|
||||
<biz-classifier>obf</biz-classifier>
|
||||
</properties>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.wvengen</groupId>
|
||||
<artifactId>proguard-maven-plugin</artifactId>
|
||||
<version>2.7.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase> <!-- 在打包阶段执行混淆 -->
|
||||
<goals>
|
||||
<goal>proguard</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<putLibraryJarsInTempDir>true</putLibraryJarsInTempDir>
|
||||
<injar>${project.build.finalName}-xj.jar</injar>
|
||||
<outjar>${project.build.finalName}-obf.jar</outjar> <!-- 输出混淆后JAR -->
|
||||
<obfuscate>true</obfuscate>
|
||||
<libs>
|
||||
<lib>C:/Program Files/Eclipse Adoptium/jdk-8.0.452.9-hotspot/jre/lib/rt.jar
|
||||
</lib> <!-- JDK 核心库 -->
|
||||
</libs>
|
||||
<proguardInclude>proguard.cfg</proguardInclude> <!-- 模块独立规则 -->
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<version>3.6.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-obf-jar</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>attach-artifact</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifacts>
|
||||
<artifact>
|
||||
<file>${project.build.directory}/${project.build.finalName}-obf.jar
|
||||
</file>
|
||||
<type>jar</type>
|
||||
<classifier>obf</classifier> <!-- 关键:标识混淆JAR -->
|
||||
</artifact>
|
||||
</artifacts>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/dependency</outputDirectory>
|
||||
<includeScope>provided</includeScope>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>local</id>
|
||||
<activation>
|
||||
@@ -810,6 +907,7 @@
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<configuration>
|
||||
<classifier>xj</classifier>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>${start-class}</mainClass>
|
||||
|
||||
Reference in New Issue
Block a user