摘要:
代码: Field[] fields = YourClass.class.getDeclaredFields(); Run On JVM 可正常获取该类所有成员变量 Compile with GraalVM to Native Image 代码不报错,但fields数组长度为0 解决办法 实现Run 阅读全文
摘要:
实现RuntimeHintsRegistrar接口,再用hints添加要注册的类型。 eg: @Configuration @ImportRuntimeHints(MyRuntimeHintsRegistrar.class) public class MyRuntimeHintsRegistrar 阅读全文