Search code examples
javaspring-mvcencryptionobfuscationsoftware-protection

Encrypt JAVA SpringFramework WebApplication


I've created a SpringFramework WebApplication and now I want to distribute it. A client asked me to evaluate the applications on his own server. I want to protect my code encrypting the source. Is it possible? If yes, what's the best tool? Are there performance loss using it?


Solution

  • We use ProGuard in ant task for our release, which makes classes harder to reverse-engineer. Also it seems better for performance.

    Notice that all variables which are based on injection annotations should be declared as private, otherwise they won't be injected correctly after the process of ProGuard.

    1. ProGuard

    2. Apache Ant