Skip to content

Mapping properties with hyphen to environment variables #22028

Closed Answered by radcortez
edeandrea asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, the issue with the - (or other chars) in env variables is that they cannot be fully represented. We have a few tricks, like for instance quotes can be represented with a double underscore.

In this situation, we don't know where to map QUARKUS_REST_CLIENT_HERO_CLIENT_URL (there are multiple candidates):

  • quarkus.rest-client.hero-client.url
  • quarkus.rest.client.hero.client.url
  • quarkus.rest.client.hero-client.url
  • quarkus.rest-client.hero.client.url

So we added another trick (if I remember correctly), which is if you add the dotted version of the property (quarkus.rest-client.hero-client.url) in application.properties or any other source for that matter, then we "guess" that QUARKUS_REST…

Replies: 2 comments 16 replies

Comment options

You must be logged in to vote
1 reply
@edeandrea
Comment options

Comment options

You must be logged in to vote
15 replies
@radcortez
Comment options

@edeandrea
Comment options

@radcortez
Comment options

@edeandrea
Comment options

@radcortez
Comment options

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