Behaviour of Environment config source is not explicit
See original GitHub issueThe spec mentions that environment variables can be used as config sources.
It does not specify if those variables need to be converted to a different format.
From how I understood @Emily-Jiang an env variable of MP_METRICS_TAGS
should be the same as a config key of mp.metrics.tags
that was passed in via e.g. a system property.
cc @jmesnil
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (10 by maintainers)
Top Results From Across the Web
Configuration Reference Guide - Quarkus
In this reference guide we're going to describe various aspects of Quarkus configuration. A Quarkus application and Quarkus itself (core and extensions) are ......
Read more >24. Externalized Configuration - Spring
Spring Boot lets you externalize your configuration so that you can work with the same application code in different environments. You can use...
Read more >Configuration for MicroProfile
Manually defining the Ordinal of a built-in ConfigSource; 5.3. Default ConfigSources. 5.3.1. Environment Variables Mapping Rules.
Read more >AWS CLI Configuration Variables - AWS Documentation
Configuration values for the AWS CLI can come from several sources: ... this credential source does not work alongside the AWS_PROFILE environment variable....
Read more >bundle-config - - Set bundler configuration options
Executing bundle with the BUNDLE_IGNORE_CONFIG environment variable set will ... will be changed in bundler 3, so it's better not to rely on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Another alternative could be to change the type of the @ConfigProperty’s
name
to beString[]
instead ofString
:With that change, we can specify either no name, a single name or an array of names (that would solve heiko’s issue):
The advantage is that we keep a single @ConfigProperty annotation to configure a property. There is only 1 defaultValue, the names of the properties are ordered.
And afaict, we do not break existing user code, the code below is still valid:
@Emily-Jiang wdyt?
+1 making the
@ConfigProperty
repeatable is a good idea.The spec should also clarify how default value interact with repeated @ConfigProperty:
In practice, this means that only the last @ConfigProperty should have a default value otherwise all subsequent ones would not be searched.
wdyt?