支持Graalvm的ORM框架-Gaarason
https://github.com/gaarason/database-all
注意事项
- 声明
model是使用@Component而非@Repository - 依赖注入是使用
@Autowired而非@Resource - 所有自定的
Autoconfiguration需要手动执行init() - 所有
model和entity需要反射, 即通过@TypeHint声明 @Column中有使用到的 自定义class, 都需要反射, 即通过@TypeHint声明- 所有
model不能实现其他的自定义接口 lambda风格字段不可使用- 所有
model需要 container.getBean(ModelShadowProvider.class).loadModels() , 目前做了动态加载, 建议model定义为entity的内部类
应该还有其他的不兼容的地方, 以后补充
@NativeHint( types = @TypeHint(types = { // entity // ... GeneralModel.class, GeneralModel.Table.class }), jdkProxies = @JdkProxyHint(types = { // interface // ... Model.class, SoftDelete.class, Query.class, SpringProxy.class, Advised.class, DecoratingProxy.class }), aotProxies = { // model // ... @AotProxyHint(targetClass = GeneralModel.class) } ) @SpringBootApplication(proxyBeanMethods = false) public class GraalVmCompatibilityApplication { public static void main(String[] args) throws InterruptedException { try { SpringApplication.run(GraalVmCompatibilityApplication.class, args); } catch (Throwable throwable) { System.out.println("something is error."); System.out.println(throwable.getMessage()); System.out.println(Arrays.toString(throwable.getStackTrace())); } new CountDownLatch(1).await(); } }

浙公网安备 33010602011771号