为什么bean不能注入不了?
spring吧
全部回复
仅看楼主
level 1
<bean id="jdbctTxManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" >
</property>
</bean>
<bean
id="JdbcBasicTxProxy" abstract="true"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
<property name="transactionManager" ref="jdbctTxManager"/>
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>
<bean id="loginAction" scope="prototype"
class="com.huangcf.login.action.UserLoginAction">
<property name="login_service" ref="login_service">
</property>
</bean>
<bean id="login_service" parent="JdbcBasicTxProxy" >
<description>Service事务代理</description>
<property name="target" ref="login_serviceImpl" />
</bean>
<bean id="login_serviceImpl" class="com.huangcf.login.service.impl.LoginServiceImpl">
<property name="login_DAOImpl" ref="login_DAOImpl"></property>
</bean>
在action中拿不到service,是为什么?我确定action中getset方法都写了,而且名字是一致的。
2015年11月01日 14点11分 1
1