【发布时间】:2016-03-17 23:51:30
【问题描述】:
我正在尝试了解 Spring Boot 中的轻松绑定 我看过https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-relaxed-binding 但我想我错过了一些东西 如果我有一个包含 abc=123 的属性文件 a.properties 并且我想使用一个环境变量来覆盖它,那么我相信我应该能够添加 A_B_C=456 并且它应该可以工作,但它似乎没有做那。 我是不是完全错过了什么
编辑
我想真正的问题是,我可以将 RelaxedDataBinder 与 PropertyPlaceholderConfigurer 一起使用来进行宽松的绑定吗?
【问题讨论】:
标签: spring spring-boot environment-variables spring-integration properties-file