注解形式读取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)