-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variable replacement #118
Comments
This already has been proposed in July last year Note that we cannot ALWAYS evaluate those variables because it's certainly valid that they might be part of the payload a user wants to resolve natively. So there must be a switch to enable or disable this. |
Mark, you're absolutely right, in most cases that I've met, I also had properties with variables that were not to be computed. But we can have two approaches for this:
Some examples that may be appropriate for the second approach:
The result for the property my.property.product.file is "/opt/myservice/data/products/${product.id}-${product.name}.pdf" Sometimes you want to clean up your configuration files without affect the code. This situation has happened to me in several projects. What do you think about this? |
Hello, @ConfigProperty(name = "my.foo")
...
@ConfigProperty(name = "my.fooalias", defaultValue = "${my.foo}") |
@sgalles good suggestion. |
Use case: |
The issue is from Jeremie:
my.property.version.major=1
This is very effective for example the file structure of a service. The root directory configuration is the domain of the installation whereas the subdirectory is the domain of application.
This has an impact on the implementation because all properties must be known before solving them. In addition, all properties dependent on a mutable property become mutable as well.
The text was updated successfully, but these errors were encountered: