相关疑难解决方法(0)

如何在Quarkus中为外部模块中的类创建Jandex索引

首先,我有一个像这样的多模块Maven层次结构:

??? project (parent pom.xml)
?   ??? service
?   ??? api-library
Run Code Online (Sandbox Code Playgroud)

所以现在问题来了:

我在使用api库中的类的服务模块中编写了JAX-RS端点。
当我开始quarkus时,我得到以下警告:

13:01:18,784 WARN  [io.qua.dep.ste.ReflectiveHierarchyStep] Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index:
- com.example.Fruit
- com.example.Car
Consider adding them to the index either by creating a Jandex index for your dependency or via quarkus.index-dependency properties.
Run Code Online (Sandbox Code Playgroud)

这两个类com.example.Fruitcom.example.Car位于在api-library模块。

所以我想我需要将它们添加到application.properties中的Jandex索引依赖项中。

但是如何将Jandex索引依赖项添加到quarkus中呢?

java multi-module quarkus

12
推荐指数
1
解决办法
1914
查看次数

标签 统计

java ×1

multi-module ×1

quarkus ×1