-
I have a custom
I want some of those properties to be quarkus extension configuration properties - for example, things like an OIDC url and credentials to use in the oidc-client. Is this kind of dynamic property pattern supported in Quarkus? Right now my custom ConfigSource does populate the property system with properties fetched from the service, but I want to delay the initialization of extensions until all properties have been loaded by all ConfigSources. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You can use a |
Beta Was this translation helpful? Give feedback.
I do not recommend mixing CDI Beans with ConfigSources. The
Config
is one of the first things we create in Quarkus to configure the runtime (including CDI). If we allow CDI Injection in sources, you get a chicken and egg problem. You need CDI to be ready to inject the bean, but you need Config to be ready to configure CDI.If you are absolutely sure that your source will only get called when CDI is already up (well, the source had to be created and available in
Config
), you could programmatically retrieve CDI and use it, but again, this is not recommended.