Error working with Jackson library post-obfuscation using Proguard

安稳与你 提交于 2019-12-02 17:36:28

It's not obvious from the stack trace, but Jackson needs some annotations, which ProGuard removes by default. Cfr. ProGuard manual > Examples > Processing annotations:

-keepattributes *Annotation*,EnclosingMethod

Furthermore, as the ominous package name 'org.codehaus.jackson.map.introspect' suggests, Jackson performs introspection on parsed classes to find getters and setters. Without knowing any better, ProGuard may be removing or renaming these, because your code might not use them explictly. You may have to keep them explicitly, e.g.:

-keep public class mydatapackage.** {
  public void set*(***);
  public *** get*();
} 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!