@ConfigProperty annotation #31870
Closed
Snorri1986
started this conversation in
Community
Replies: 1 comment
-
The The programmatic API can be used in cases where you need to look up a configuration in a non-CDI environment or when the piece of code is not a CDI Bean. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Why
@ConfigProperty
annotation does not initialize variables in a class ?Instead, I use
ConfigProvider.getConfig().getValue("system.varname", String.class)
The article below tells me that it should work.
https://quarkus.io/guides/config
Kindly ask you to explain in what cases better use
@ConfigProperty
and in what casesConfigProvider
?Thanks.
Beta Was this translation helpful? Give feedback.
All reactions