How to auto register POJOs for reflection? #50898
-
|
Is there a way to auto register for reflection all java models in the project without adding |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
|
CC @Ladicek |
Beta Was this translation helpful? Give feedback.
-
|
I'm no expert on this topic (CC @geoand, who I'm sure knows more about the topic than me), but I'm not aware of any mechanism for bulk registering classes for reflection outside of Quarkus extension. In a Quarkus extension, it should be relatively straightforward to obtain all classes you need from Jandex and produce Outside of an extension, you can either annotate each class with |
Beta Was this translation helpful? Give feedback.
-
|
A little update. Instead of CombinedIndexBuildItem I started using ApplicationArchivesBuildItem. Then I get the index from its getRootArchive().getIndex() method which represents the classes and resources that are only part of the current project. |
Beta Was this translation helpful? Give feedback.
@geoand @Ladicek I've implemented this solution and it works just fine for my needs.