Skip to content
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@arinn1204
Comment options

@radcortez
Comment options

Answer selected by radcortez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants