线程“主”中的异常org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:文件[D:\ eclipse-workspace \ spring \ IOC13-ApllicationContextContainerWithCustomer \ src \ org \ pp \ config \ applicationcontext.xml]无效;嵌套的异常是org.xml.sax.SAXParseException; lineNumber:21; columnNumber:36; cvc-complex-type.2.4.a:发现无效的内容(从元素“属性”开始)。 '{“ http://www.springframework.org/schema/beans”:导入,“ http://www.springframework.org/schema/beans”:别名,“ http://www.springframework.org/schema/beans”:bean,WC [## other:“ http://www.springframework.org/schema/beans”],应该是http://www.springframework.org/schema/beans“:beans}'。
这是我的spring bean配置文件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- configure property placeholder configurer -->
<bean id ="pphc" class = "org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name = "location" value = "src/org/pp/commons/DBdetails.properties"/>
</bean>
<!-- configure DriverManager datasource -->
<bean id = "dds" class = "org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name = "driverClassName" value= "${jdbc.driver}"/>
<property name = "url" value= "${jdbc.url}"/>
<property name = "username" value= "${jdbc.user}"/>
<property name = "password" value= "${jdbc.pwd}"/>
</bean>
<!-- configure DAO -->
<bean id = "dao" class = "org.pp.dao.ResultDAO"/>
<property name = "ds" ref = "dds"/>
</bean>
<!-- configure service -->
<bean id = "service" class="org.pp.service.StudentService">
<property name ="dao" ref="dao"/>
</bean>
</beans>
为什么无法配置数据源ds以注入到dao组件中?