忽略 quarkus 中的 persistence.xml

Ignore persistence.xml in quarkus

我需要将一个外部 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.

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

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

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