java为什么要使用@PropertySource而不是PropertyPlaceHolderConfigure?
在Spring
Javadoc中:
"existing configuration makes use of the "systemPropertiesMode" and/or "systemPropertiesModeName" properties. Users are encouraged to move away from using these settings, and rather configure property source search order through the container's Environment"
为什么鼓励搜索集装箱的环境
编辑:
需要了解为什么使用@PropertySource而不是PropertyPlaceHolderConfigure,如果两者都实现了路径中提到的获取资源的目标,那么PropertySource比PropertyPlaceHolderConfiger有什么好处
# 1 楼答案
我想这是因为规则#3 of 12 factor app principles: