Quarkus 扩展的麻烦 [英] Quarkus extensions nediness

查看:45
本文介绍了Quarkus 扩展的麻烦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

quarkus 扩展的用途是什么?

What are quarkus extensions meant for?

我问自己有很多扩展是多余的还是多余的.

There are a bunch of extensions I'm asking myself if they are redundant or superfluous.

例如,为什么 quarkus 提供Hibernate ORM"扩展?为什么不能直接使用 Hibernate?

For example, why quarkus is providing an "Hibernate ORM" extension? Why ain't able to just use Hibernate straightforwardly?

推荐答案

它在底层使用 Hibernate ORM.

It's using Hibernate ORM under the hood.

存在扩展有几个原因:

  • 他们将库与 Quarkus 开发模型联系起来.通常,Hibernate ORM 扩展将使用来自 application.properties 的配置属性并引导持久性单元;
  • 它们允许将事物从运行时转移到构建时:在 ORM 的情况下,当使用 GraalVM 时,所有 Hibernate 元数据都在编译本机映像时构建;
  • 它允许为 GraalVM 原生镜像配置东西,通常为反射注册类,添加资源......
  • 同样在 Hibernate ORM 的情况下,我们的一些默认设置与历史上的 Hibernate ORM 默认设置不同.
  • they tie the library to the Quarkus development model. Typically the Hibernate ORM extension will use the configuration properties coming from the application.properties and bootstrap the persistence unit;
  • they allow to move things from runtime to build time: in the case of ORM, when using GraalVM, all the Hibernate metadata are built when compiling the native image;
  • it allows configuring things for GraalVM native images, typically registering class for reflection, adding resources...
  • also in the case of Hibernate ORM, some of our defaults are not the same as the historical Hibernate ORM defaults.

这篇关于Quarkus 扩展的麻烦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆