Spring obfuscation

I've searched for any solutions to obfuscate a project that uses the Spring MVC framework, but I haven't found anything.

When I obfuscate a project with ProGuard, for example, I have something like this:

Before obfuscation:
Class A:

class A {
MyObject obj1;

//Constructors
//getters & setters
}

      

applicationContext.xml

<bean id="objectOne" class="com.myproject.MyClass" />
<!-- Injection -->
<bean id="A" class="com.myproject.controller.A">
  <property name="obj1" ref="objectOne" />
</bean>

      

After obfuscation:

class A {
  Z a = new Z();

 //Constructors
 //Getters & Setters
}

      

But ApplicationContext remains the same ...

Is there a way to obfuscate classes and applicationContext?

+3


source to share


1 answer


Obfuscation does not work when reflection occurs because it does not know which files contain references to the original class name.



+2


source







All Articles