注解形式读取properties文件中的属性

时间:2017-12-02 12:13:13   收藏:0   阅读:186

1、spring.xml中加入(多个properties 用逗号隔开)  <context:property-placeholder location="classpath:jdbc.properties,classpath:config.properties" />

2、spring-mvc.xml 中加入(只加上面一句controller中读取不到值) <context:property-placeholder location="classpath:config.properties" />

 

原文:http://www.cnblogs.com/xdcr/p/7953687.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!