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>
这样的方式就获取到了属性
<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>
这样的方式就获取到了属性
相关文章推荐
- 配置 magic_quotes_gpc = off 无效的解决方法
- ObjectContext的ApplyPropertyChanges()方法不能更新导航属性的解决办法
- 使用Spring PropertyPlaceholderConfigurer 配置中文出现乱码的解决方法
- spring配置文件applicationContext.xml不能自动提示的解决方法
- “回发或回调参数无效。在配置中使用 或在页面中使用 启用了事件验证。”的替代解决方法
- Web服务器中error-page配置无效的解决方法
- 关于在Spring配置特殊bean-分散配置的时候抛出的异常:无法找到元素 'context:component-scan' 的声明 的解决方法
- spring配置文件applicationContext.xml不能提示的解决方法
- Tomcat在server.xml中设置<Context>的reloadable无效的解决方法
- android4.4 Launcher3 修改配置文件default_workspace.xml无效的解决方法
- thinkphp TAG_NESTED_LEVEL配置无效 volist嵌套不能超过三层解决方法
- 在linux上配置Maven环境变量(重启mvn -v无效的解决方法)
- Struts2拦截器属性excludeMethods、includeMethods配置无效之解决方法
- Response.Redirect无效的解决方法(ajax配置文件)
- Struts2拦截器属性excludeMethods、includeMethods配置无效之解决方法
- ubuntu配置全局环境变量后开新shell变量无效的解决方法
- 如何解决XMind提示安装无效配置路径的方法
- maven的install出错,添加配置文件头网址无效,验证不通过的解决方法——入职第3天工作总结
- WPF:指定的命名连接在配置中找不到、非计划用于 EntityClient 提供程序或者无效的解决方法
- win7下IIS错误:"无法访问请求的页面,因为该页的相关配置数据无效"的解决方法(转)