Quarkus: configuration docs : quarkus.application.name property overridable at runtime

Created on 23 Jul 2020  路  3Comments  路  Source: quarkusio/quarkus

Describe the bug
quarkus.application.name seems overridable at runtime whereas it is flagged as fixed at build time within the docs

Expected behavior
The doc to reflect the fact that quarkus.application.name config property can be overridden at runtime

Actual behavior
The doc flags the quarkus.application.name config property as fixed at build time.

To Reproduce
Steps to reproduce the behavior:

  1. Use the @ConfigParam annotation to read the quarkus.application.name config property
  2. Build your application
  3. Override the parameter (Eg. setting QUARKUS_APPLICATION_NAME environment variable)
  4. Run the application
  5. Check that the value is overridden at runtime

Configuration

# Add your application.properties here, if applicable.

Screenshots
(If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

  • Output of uname -a or ver:
    Linux NCEL69527 4.4.0-17134-Microsoft #1488-Microsoft Mon May 05 16:17:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Output of java -version:
    openjdk 11.0.6 2020-01-14
    OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
    OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
  • GraalVM version (if different from Java):
    n/a
  • Quarkus version or git rev:
    1.6.0Final
  • Build tool (ie. output of mvnw --version or gradlew --version):
    Apache Maven 3.6.3

Additional context
(Add any other context about the problem here.)

kinbug triaginvalid

Most helpful comment

This is interesting for sure :)

Given the way you are using it (via @ConfigProperty) in this specific use case, your code will see the updated value.
However, that doesn't mean it's a runtime property, due the fact that the Quarkus extensions that actually use this value (the spring-cloud-config extension for example), will not use the runtime value, but the build time one.

That is what is meant by the fact that the property is build time and runtime visible.

All 3 comments

This is interesting for sure :)

Given the way you are using it (via @ConfigProperty) in this specific use case, your code will see the updated value.
However, that doesn't mean it's a runtime property, due the fact that the Quarkus extensions that actually use this value (the spring-cloud-config extension for example), will not use the runtime value, but the build time one.

That is what is meant by the fact that the property is build time and runtime visible.

OK thanks for clarifying

YW!

Was this page helpful?
0 / 5 - 0 ratings