Spring 自动装配的问题
Dee 2011-09-20 02:22:04 <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-2.0.xsd" default-autowire="no">
<bean id="testService" class="com.ipi.service.impl.TestServiceImpl" autowire="no">
<property name="testDao" ref="testDao"></property>
</bean>
<bean id="testDao" class="com.ipi.dao.impl.TestDaoImpl">
</bean>
<bean id="sfid"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation"
value="classpath:hibernate.cfg.xml">
</property>
</bean></beans>
这里
default-autowire="no"
我已经禁用了自动装配 为什么 student = testService.test(); 这里的testService 还是会自动的初始化 ,怎么才能禁用自动注入啊??