首先,我有一个像这样的多模块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.Fruit和com.example.Car位于在api-library模块。
所以我想我需要将它们添加到application.properties中的Jandex索引依赖项中。
但是如何将Jandex索引依赖项添加到quarkus中呢?