【问题标题】:Ignore persistence.xml in quarkus忽略quarkus中的persistence.xml
【发布时间】:2020-01-24 15:10:41
【问题描述】:

我需要将一个外部 JAR 文件导入到我的 quarkus 项目中,其中包含一个 persistence.xml。有没有办法忽略嵌入的 persistence.xml?

应该是,根据https://github.com/quarkusio/quarkus/blob/2d2124653d5115f85fc072ef6b5a55756039c940/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/PersistenceUnitsHolder.java#L36中的评论:

 * The scanner may be null to use the default scanner, or a custom scanner can be
 * used to stop Hibernate scanning. It is expected that the scanner will be
 * provided by Quarkus via its hold of Jandex info.

不过,我还没有找到提供自定义扫描仪的方法。

【问题讨论】:

    标签: quarkus


    【解决方案1】:

    我不认为你现在会找到一种方法来做到这一点,我猜如果你在一个罐子里同时使用application.properties 和这个persistence.xml,Quarkus 将无法启动。另外,让 persistence.xml 在 Quarkus 中工作有点棘手,因为您必须手动设置一些高级设置才能与 Quarkus 行为保持一致。

    您能在我们的跟踪器 (https://github.com/quarkusio/quarkus/issues) 中打开一个问题吗?谢谢!

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-24
    • 2022-10-05
    • 2011-02-09
    • 2011-04-21
    • 1970-01-01
    • 2013-12-15
    相关资源
    最近更新 更多