Skip to main content

Java Awesome

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 和 版本?

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
  • 国产

整合

Database

  • ORM
    • Hibernet
    • JPA
  • MyBatis
  • jooq
  • querydsl

IoC

Library

  • Core
  • Lambda
  • Reflection
    • joor
      • Fluent Reflection
  • DTO/Convert
  • Doc/Meta
    • springdoc
      • OpenAPI 3
      • JSR-303
      • SpringBoot v1,v2,v3
      • 支持 GraalVM
    • springfox/springfox
      • ⚠️ 停止维护,不支持 SpringBoot 3.0
      • 使用注解
  • HTML/Dom
  • javers
    • object auditing and diff framework for Java
    • @Audited
    • @javax.persistence.OrderColumn
    • @CollectionId
    • AuditJoinTable
    • AuditMappedBy

Tool Chain

Learn

GUI

Misc

Spec

Debugging

Template

  • Apache FreeMarker
  • Apache Velocity
  • Thymeleaf
  • Apache Tiles
    • Web APP
  • Mustache.java
  • Groovy
  • jsp
  • antlr/stringtemplate4

QA