Avoiding reflection errors after obfuscation with Proguard (Spring)

I obfuscated my classes and updated my x7 configuration, but I added that proguard changed the names of my setter methods and turned it into something like

public void d(a a){
b= a;
}

therefore, when spring tries to call setB ("something") by reflection, it will work. what is a good way to avoid reflection errors when obfuscated? any thoughts

+3
source share
2 answers

You need to avoid the obfuscation of these classes. Use the - save options to exclude them. An alternative is to use Spring JavaConfig instead of XML; thus, the configuration will also be confused.

+4
source

spring bean

, JavaBean.

JavaBean, set. , className BeanInfo, , , Proguard ...

+2

All Articles