您的位置:首页 > 运维架构

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

2017-12-02 11:09 232 查看
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" />
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: