Java Awesome
- 反编译/解密
- mstrobel/procyon
- CFR another java decompiler
- Fernflower https://github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine
- Apache-2.0
- by IDEA
- mirror fesh0r/fernflower
- java-deobfuscator/deobfuscator
- Apache-2.0
- JD-GUI https://github.com/java-decompiler/jd-gui
- 加密/混淆
- core-lib/xjar
- Apache-2.0, Java
- roseboy/classfinal
- Apache-2.0, Java
- Java Class Encryption Tool
- 基于 -agentJava:xxx.jar
- 原始的class文件并不会完全被加密,只是方法体被清空,保留方法参数、注解等信息,这是为了兼容spring,swagger等扫描注解的框架; 方法体被清空后,反编译者只能看到方法名和注解,看不到方法的具体内容;当class被classloader加载时,真正的方法体会被解密注入。
- gitee
java -javaagent:yourpaoject-encrypted.jar='-pwd 0000000' -jar yourpaoject-encrypted.jar
- 为了保证项目在运行时的安全,启动jvm时请加参数: -XX:+DisableAttachMechanism
- https://github.com/roseboy/classfinal/blob/master/classfinal-core/src/main/java/net/roseboy/classfinal/JarDecryptor.java
- 默认密码 org.springframework.config.Pass
- 机器码 org.springframework.config.Code
- 密码的 Hash org.springframework.config.PassHash
- META-INF/.classes/
- net.roseboy.classfinal.CoreAgent
- core-lib/xjar
import net.roseboy.classfinal.JarDecryptor;
import net.roseboy.classfinal.util.EncryptUtils;
import net.roseboy.classfinal.util.StrUtils;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
public class DecryptClassFinal {
public static void main(String[] args) throws IOException {
String src =System.getProperty("user.dir") + "/tmp/META-INF/.classes";
String dst = System.getProperty("user.dir") + "/src/main/class";
File srcDir = new File(src);
JarDecryptor.getInstance();
String pass = Files.readString(Path.of(src+"/org.springframework.config.Pass"));
char[] password = EncryptUtils.md5(pass.toCharArray());
System.out.printf("src:%s\n", src);
System.out.printf("dst:%s\n", dst);
System.out.printf("password:%s\n", pass);
if (srcDir.isDirectory()) {
for (File file : srcDir.listFiles()) {
String fp = file.getName();
if (fp.startsWith("org.springframework")) {
continue;
}
byte[] fileBytes = Files.readAllBytes(file.toPath());
byte[] out = dec(password, fp, fileBytes);
String[] split = fp.split("[.]");
String fn = split[split.length-1];
String p = dst+"/"+ fp.substring(0, fp.lastIndexOf('.')).replaceAll("[.]", "/");
new File(p).mkdirs();
String f = p+"/"+ fn +".class";
System.out.println("Write to: "+f+" Len:"+out.length);
Files.write(new File(f).toPath(), out);
}
}
}
public static byte[] dec(char[] password, String fileName, byte[] bytes){
char[] pass;
pass = StrUtils.merger(new char[][]{password, fileName.toCharArray()});
return EncryptUtils.de(bytes, pass, 1);
}
}
java -cp ~/Applications/IntelliJ\ IDEA\ Ultimate.app/Contents/plugins/java-decompiler/lib/java-decompiler.jar \
org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler \
-dgs=true \
src/main/class/ src/main/java/
JDK
如何选择 JDK 和 版本?
- 用 Adoptium
- 只用 LTS 版本
- 发行版
- Adoptium
- AdoptOpenJDK -> Adoptium
- Eclipse 维护
- Eclipse Temurin - name of the OpenJDK distribution from Adoptium
- Amazon Corretto
- Alibaba Dragonwell
- GraalVM
- Java.net
- Zulu
- Liberica
- Liberica NIK
- Microsoft
- Oracle
- Mandrel
- SapMachine
- Semeru
- Trava
- Adoptium
- JVM 实现
- Hotpot
- OpenJ9
- GraalVM
- SubstrateVM
- GraalVM Native
- whichjdk
- Version Manager
- https://sdkman.io/
- sdkman/sdkman-cli
- shell
- sdkman/sdkman-cli
- jenv/jenv
- shell
- shyiko/jabba
- golang
- https://sdkman.io/
Languages
效率
- lombok
Frameworks
- spring
- microprofile
- quakus
- OpenLiberty/open-liberty
- IBM
- oracle/helidon
- microservices
- micronaut
- vertx
- Sprint Cloud Vendor
- Sprint Cloud Alibaba
- Sprint Cloud GCP
- Sprint Cloud Netflix
- Sprint Cloud AWS
- Sprint Cloud Azure
- Sprint Cloud Huawei
- 国产
整合
- jhipster
- jeecgboot/jeecg-boot
- elunez/eladmin
Database
- ORM
- Hibernet
- JPA
- MyBatis
- jooq
- querydsl
IoC
- guice
- dapper
Library
- Core
- apache commons
- dromara/hutool
- oblac/jodd
- ⚠️ 不活跃
- Lambda
- Reflection
- joor
- Fluent Reflection
- joor
- DTO/Convert
- mapstruct/mapstruct
- 对象互转 - 基于反射
- mapstruct/mapstruct
- Doc/Meta
- springdoc
- OpenAPI 3
- JSR-303
- SpringBoot v1,v2,v3
- 支持 GraalVM
- springfox/springfox
- ⚠️ 停止维护,不支持 SpringBoot 3.0
- 使用注解
- springdoc
- HTML/Dom
- javers
- object auditing and diff framework for Java
- @Audited
- @javax.persistence.OrderColumn
- @CollectionId
- AuditJoinTable
- AuditMappedBy
Tool Chain
Learn
GUI
- JetBrains/compose-jb
- Compose for Desktop
Misc
- apple/GCGC
- GC 日志分析
Spec
Debugging
- runsidekick/sidekick
- AGPL-3.0, Java
- Like chrome dev tools but for your backend
Template
- Apache FreeMarker
- Apache Velocity
- Thymeleaf
- Apache Tiles
- Web APP
- Mustache.java
- Groovy
- jsp
- antlr/stringtemplate4
QA
- Checkstyle, PMD, JDepend
- Platform
- Hudson
- Jenkins
- SonarQube
- Squale
- XRadar
- https://maven.apache.org/code-quality-management.html