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

context:property-placeholder junit配置无效解决方法

2017-03-03 10:20 162 查看
<!-- 加载配置文件 -->
<context:property-placeholder location="classpath:*.properties" />

我认为是启动的时候还没加载这个扫描

改成

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:config.properties</value>
</list>
</property>

</bean>

这样的方式就获取到了属性
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐