Quarkus native compilation requires explicit declaration of Classes to be registered for Reflection

6 days ago 4
ARTICLE AD BOX

I'm using Quarkus enabling native compilation. At runtime I noticed some exceptions that required me to register classes for reflection e.g:

@RegisterForReflection( targets = { MyClass.class, MyClass2.class, ...

This solved the runtime issue.

However this approach doesn't scale and seems unsafe. In some cases I might have a lot of classes requiring registration and of course doing it manually/explicitly creates the risk of missing one class and thus eventually getting a runtime exception.

Is there a best pratice around this?

Read Entire Article