1:在任何spring bean中注入PropertySourcesPlaceholderConfigurer对象,如:
@Autowired PropertySourcesPlaceholderConfigurer aa;
2:获取当前配置中的值
Object getProperty(){ return aa.getAppliedPropertySources().get("localProperties").getProperty("controllerPath"); }
标签:aa,getProperty,spring,配置,获取,PropertySourcesPlaceholderConfigurer From: https://www.cnblogs.com/yzeng/p/16951128.html