Inconsistent binding from environment varaibles to maps
See original GitHub issueI’ve noticed an inconsistency in properties binding from an ENV variable and property defined in application.properties
Consider following example:
@ConfigurationProperties("com.test")
public class Props {
private Map<String, Map<String, String>> property;
}
application.properties <- binding works correctly
com.test.property.foo.bar=value
Environment variable <- binding fails
export COM_TEST_PROPERTY_CCC_DDD=VALUE
I would expect that the same binding behavior for an externalized configuration. Any idea how to resolve this issue using Spring Boot 1.5.2?
I am using Spring Boot 1.5.2, Linux Mint 18.1, Java 8 (“1.8.0_121”) Demo application available: https://github.com/peterjurkovic/spring-boot-binding-demo
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to customize properties binding from environment ...
I would like to get binded properties from environment variable to a map. If a property is defined in application.properties binding works ...
Read more >Spring Boot Features
As an alternative to environment variables, many cloud platforms now allow you to map configuration into mounted data volumes.
Read more >Environment variables - SideFX
These mappings are used when a given opened path fails to find fallbacks. Mappings can map one directory to another directory. The key...
Read more >Docker Compose release notes
Fixed compose down to respect COMPOSE_REMOVE_ORPHANS environment variable. Fixes #9562. Fixed project-level bind mount volumes. Fixes docker/for-mac#6317. Fixed ...
Read more >show spanning-tree inconsistent-ports (MSTP) - Aruba Networks
Shows ports blocked by STP protection functions such as Root guard, Loop guard, BPDU guard, and RPVST guard in addition to MSTI information....
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 Free
Top 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

I’ve just hit a similar issue with Eureka default zone with Spring Boot 2.0.0.M7 - it doesn’t seem to correctly handle camel cases when binding map elements…
@philwebb This is a great test case: compound prefix with nested maps. If 2.0 can bind this correctly it can likely handle anything.