How to get "quarkus.profile" value using Kotlin on Quarkus startup? #26823
-
I'm trying to log the value of the
And here's the rudimentary
What changes would I need to make in
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
/cc @evanchooly |
Beta Was this translation helpful? Give feedback.
-
So I think I found a way to do it, by adding the following code at the start of
Which leads me to my next question: is there a better/cleaner way to do this? |
Beta Was this translation helpful? Give feedback.
Yes, Quarkus does not fully support multiple profiles at the moment. The plan is to add them at some point, which is why I do not recommend using
ProfileManager
because it will most likely have to go away (or be changed in an incompatible way). In practice, everything that internally usesProfileManager
does not support them, but if you pass multiple profiles (profile names separated by a comma), everything handled by SmallRye Config will work. SmallRye Config fully supports multiple Profiles.In most cases, the Quarkus profile will be the same returned by SmallRye Config (except that it returns in a List type, so the first element contains the profile). Only if you try to use multiple pr…