It's as simple as running a ha, and then our j**a file is compiled into .class file.
It is for the .. in the compiled and generated jar war packageclass file reverse restore back, you can see what your ** wrote.
The more commonly used decompilation tool jd-gui directly throws the compiled jar into it, and most of them can be decompiled to see the source code:
So what if you don't want to decompile it for others to see what you wrote?
How? The ** confusion of this article is one of the means.
I'll show you, but what you see in the decompilation isn't the real **.
Let's start with an example of the effect
Let's take a look at what we want to do when we confuse a project**? It's just two steps.
In the first step, add a new file proguardcfg :
proguard.cfg
Specify the version of j**a -target 18 proguard will optimize and compress **, he will delete the unused class or class member variables, etc.-dontshrink whether to turn off bytecode-level optimization, if not, set the following configuration-dontoptimize when obfuscated, do not generate mixed case class names, the default is mixed case -dontusemixedcaseclassnames Adopt a unique strategy for the confusion of the naming of class members -useuniqueclassmembernames does not generate mixed-case class names when obfuscated, the default is that you can mix case-dontusemixedcaseclassnames after obfuscating class names for using classforname('classname'-AdaptClassStrings to keep exceptions, annotations -keepattributes exceptions,innerclasses,signature,deprecated,sourcefile,linenumbertable,*annotation*,enclosingmethod This option will save all the original names in the interface (not to be obfuscated) --keepnames interface ** This option will save all the original interface files in all packages (not to be obfuscated) -keep interface * extends * to keep the parameter names, because the parameters of the controller, or interfaces such as mybatis will be unacceptable if they are confused, and the parameter -keepparameternames cannot be found in the xml file Keep enumeration members and methods -keepclassmembers enum * Don't obfuscate all classes, save comments from the original definition --keepclassmembers class * Ignore warn messages -ignorewarnings Ignore note messages -dontnote print configuration information -printconfiguration-keep public class comexample.myproguarddemo.myproguarddemoapplicationYou can configure which classes are not involved in obfuscation, which enumerations are preserved, which method names are not obfuscated, and so on.
The second step is to add the Proguard obfuscation plugin to the POM file
Added the following configuration to the build tag.
com.github.wvengen proguard-m**en-plugin 2.6.0 package proguard $.jar $.jar true $/proguard.cfg $/lib/rt.jar $/lib/jce.jar $/lib/jsse.jar !meta-inf/**,meta-inf/versions/9/**.class $/target org.springframework.boot spring-boot-m**en-plugin repackage com.example.myproguarddemo.myproguarddemoapplication
If so**, please indicate the source: open source bytes