0

I'm using Quarkus 2.13 and I made a simple Quarkus Extension which defines a List<String> through application.properties. I've added this extension into an application and now I need to check if this List is null or empty everytime the application starts.

Is there something similar to

void onStart(@Observes StartupEvent event) {}

to be used for extensions?

I've already read this piece of documentation (https://quarkus.io/version/2.13/guides/writing-extensions#startup-and-shutdown-events) but it didn't help me.

Thanks

  • I wonder if the focus on doing the check at startup might be a red herring? I have a feeling if you use the normal BuildItem programming model for extensions, the check at startup will be a side-effect that comes for free. For example, you could do a `@Record(RUNTIME_INIT)` for the action. I assume you're accessing the List contents through the config API, and the config is defined as runtime config? – Holly Cummins May 31 '23 at 11:30

0 Answers0