mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-18 21:27:49 +00:00
39 lines
1.8 KiB
INI
39 lines
1.8 KiB
INI
# 指定Java的版本
|
||
# -target 17
|
||
# proguard会对代码进行优化压缩,他会删除从未使用的类或者类成员变量等
|
||
-dontshrink
|
||
# 是否关闭字节码级别的优化,如果不开启则设置如下配置
|
||
-dontoptimize
|
||
# 对于类成员的命名的混淆采取唯一策略
|
||
-useuniqueclassmembernames
|
||
## 混淆类名之后,对使用Class.forName('className')之类的地方进行相应替代
|
||
-adaptclassstrings
|
||
# 混淆时不生成大小写混合的类名,默认是可以大小写混合
|
||
-dontusemixedcaseclassnames
|
||
# 对异常、注解信息予以保留
|
||
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
|
||
# 此选项将保存接口中的所有原始名称(不混淆)-->
|
||
-keepnames interface ** { *; }
|
||
# 此选项将保存所有软件包中的所有原始接口文件(不进行混淆)
|
||
-keep interface * extends * { *; }
|
||
# 保留参数名,因为控制器,或者Mybatis等接口的参数如果混淆会导致无法接受参数,xml文件找不到参数
|
||
-keepparameternames
|
||
# 保留枚举成员及方法
|
||
-keepclassmembers enum * { *; }
|
||
# 不混淆所有类,保存原始定义的注释-
|
||
-keepclassmembers class * {
|
||
@org.springframework.context.annotation.Bean *;
|
||
@org.springframework.beans.factory.annotation.Autowired *;
|
||
@org.springframework.beans.factory.annotation.Value *;
|
||
@org.springframework.stereotype.Service *;
|
||
@org.springframework.stereotype.Component *;
|
||
@org.springframework.web.bind.annotation.GetMapping *;
|
||
@org.springframework.web.bind.annotation.PostMapping *;
|
||
@org.springframework.web.bind.annotation.RequestBody *;
|
||
@org.springframework.web.bind.annotation.RequestMapping *;
|
||
@org.springframework.web.bind.annotation.RestController *;
|
||
}
|
||
# 忽略warn消息
|
||
-ignorewarnings
|
||
# 打印配置信息
|
||
-printconfiguration |