Spring读取配置文件org.springframework.beans.factory.BeanCreationException异常产生的原因和解决方案
2017-01-09 14:22
776 查看
一般出现这种问题有可能是因为系统需要读取多个配置文件造成的,所以此时就需要配置
<property name="ignoreUnresolvablePlaceholders" value="true" />
完整spring.xml读取properties文件代码如下如下:
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:spring-config.properties"/>
<property name="ignoreUnresolvablePlaceholders" value="true" />
</bean>
<property name="ignoreUnresolvablePlaceholders" value="true" />
完整spring.xml读取properties文件代码如下如下:
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:spring-config.properties"/>
<property name="ignoreUnresolvablePlaceholders" value="true" />
</bean>
相关文章推荐
- 题目:org.springframework.beans.factory.BeanCreationException(hibernate中的jar包和spring中的jar包冲突)异常产生的原因和解决方案。
- 在配置Shiro时,启动tomcat报错出现异常(org.springframework.beans.factory.BeanCreationException)
- mybatis配置通用dao和service时出现org.springframework.beans.factory.BeanCreationException异常
- 出现 org.springframework.beans.factory.BeanCreationException 异常的原因及解决方法
- Spring中配置AOP出现org.springframework.beans.factory.BeanCreationException异常
- org.springframework.beans.factory.BeanCreationException异常原因及解决办法
- spring启动异常:org.springframework.beans.factory.BeanCreationException
- SH初步整合的异常:org.springframework.beans.factory.BeanCreationException
- 异常处理 org.springframework.beans.factory.BeanCreationException
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name解决方案
- org.springframework.beans.factory.BeanCreationException异常
- 异常:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletCo
- spring异常解决方法:org.springframework.beans.factory.BeanCreationNotAllowedException
- org.springframework.beans.factory.BeanCreationException: Error creating bean 异常
- tomcat启动异常--org.springframework.beans.factory.BeanCreationException
- 严重:Context initialization failed org.springframework.beans.factory.BeanCreationException: 解决方案
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto
- org.springframework.beans.factory.BeanCreationException
- org.springframework.beans.factory.BeanCreationException的问题所在!!
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'selectcommoninfo' defined in ServletCont