大神 们 帮帮看看你 为何我读取不到xml 中的 bean 元素 不胜感
spring吧
全部回复
仅看楼主
level 1
处女座的水瓶座
楼主
2015年08月20日 10点08分
1
level 11
巴黎初雨💧
是不是类名写错了?
2015年08月20日 13点08分
2
level 6
那天你我
配置文件出错了......你的POJO完全没有托管到spring
2015年08月22日 00点08分
3
level 1
yfahll
你把helloManager.xml改为:
<?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:p="
http://www.springframework.org/schema/p
"
xmlns:context="
http://www.springframework.org/schema/context
"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
">
<bean id="helloWorld" class="cn.com.spring01.helloTest.HelloWorld"></bean>
<bean id="helloChina" class="cn.com.spring01.helloTest.HelloChina"></bean>
<bean id="preson" class="cn.com.spring01.helloTest.Preson">
<property name="helloManager" ref="helloChina"/>
</bean>
</beans>
2015年09月01日 08点09分
5
1