标签:
<!-- 属性文件 -->
<bean id="configs" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list>
<value>classpath:spring/jdbc.properties</value>
</list>
</property>
@Autowired
private Properties configs;
Object object2 = configs.get("jdbc.username");
System.err.println(object2);
spring 的 PropertyPlaceholderConfigurer读取的属性怎么访问 (java访问方式,不是xml中的占位符哦)
标签:
原文地址:http://www.cnblogs.com/beijingstruggle/p/5634444.html