项目场景:
在配置spring环境时,stdout报以下异常信息问题描述:
关键信息就这一条:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
原因分析:
分析异常定位到spring.xml配置文件的beans标签中,发现由于没有添加Spring框架需要的属性值,导致无法找到对应的资源存储路径而出错。
解决方案:
按照以下提供的格式重新配置即可。
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<context:annotation-config/>
</beans>
对你有用的话,记得一键三连哦~