Gabriel Câmara
Gabriel Câmara

Reputation: 1249

Spring obfuscation

I've been looking for any solutions to obfuscate a project which uses Spring MVC framework, but I didn't find anything.

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

Before the 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 the Obfuscation:

class A {
  Z a = new Z();

 //Constructors
 //Getters & Setters
}

But the ApplicationContext remains the same...

Is there any way to obfuscate the classes and the applicationContext?

Upvotes: 4

Views: 2474

Answers (1)

Jin Kim
Jin Kim

Reputation: 17732

Obfuscation doesn't work when reflection is involved since it won't know which files contain references to the original class name.

Upvotes: 2

Related Questions