ProGuard 怎样混淆 web项目 SSH

老帅哥23333 2015-01-16 01:20:56
1、由于我的程序要发布到生产的机器上了,担心被反编译,故决定混淆。但是我使用 ProGuard 4.8
一混淆就出现了很多的类重复定义的提示。还有
Note: there were 106 unresolved dynamic references to classes or interfaces.
You should check if you need to specify additional program jars.
Note: there were 1 class casts of dynamically created class instances.
You might consider explicitly keeping the mentioned classes and/or
their implementations (using '-keep').
Note: there were 114 accesses to class members by means of introspection.
You should consider explicitly keeping the mentioned class members
(using '-keep' or '-keepclassmembers').
Note: You're ignoring all warnings!
我只想混淆指定的包中的类、
遍寻网上,那些配置文件针对 web项目 SSH 的基本上都是不能用的。
以下是我根据 Proguard 的 文档写的测试配置文件

-printmapping myapplication.map

-dontshrink
-dontoptimize
-dontpreverify

-keep class com.sch.**{
void set*(***);
*** get*();
}

-keep class org.**{*;}
-keep class antlr.**{*;}
-keep class net.**{*;}
-keep class freemarker.**{*;}
-keep class javassist.**{*;}
-keep class javax.**{*;}
-keep class junit.**{*;}
-keep class ognl.**{*;}
-keep class oracle.**{*;}
-keep class com.mchange.**{*;}
-keep class com.opensymphony.**{*;}
-keep class com.microsoft.**{*;}
-keep class microsoft.**{*;}
-keep class com.sun.**{*;}
-dontwarn

这个混淆的后生成的 war 文件我的项目的类被 被proguard 全部弄不见了。
大家有混淆过 ssh 项目的请指教一下。
...全文
247 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
永远TeRny 2015-10-08
  • 打赏
  • 举报
回复
http://blog.csdn.net/wltj920/article/details/48970869
crx_np 2015-01-21
  • 打赏
  • 举报
回复
根据CSDN网友 提供的思路,直接将我们的项目写的类打成jar包,然后在使用 proguard 对这个jar包进行混淆。即可,问题解决。
老帅哥23333 2015-01-21
  • 打赏
  • 举报
回复
没人关注吗?

5,655

社区成员

发帖
与我相关
我的任务
社区描述
Web开发应用服务器相关讨论专区
社区管理员
  • 应用服务器社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧