1. 程式人生 > >BeanNameAutoProxyCreator 不支援annotation的問題解決方法討論

BeanNameAutoProxyCreator 不支援annotation的問題解決方法討論

有人SpringSource的BBS上提出了問題,但沒有人解決
http://forum.springsource.org/showthread.php?t=70355

spring事務配置

<!-- 事務配置 -->
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>

<bean id="transationInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="transactionManager" />
<property name="transactionAttributes">
<props>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="delete*">PROPAGATION_REQUIRED</prop>
<prop key="Save*">PROPAGATION_REQUIRED</prop>
<prop key="merge*">PROPAGATION_REQUIRED</prop>
<prop key="shield*" >PROPAGATION_REQUIRED</prop>
</props>
</property>

</bean>

<bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="beanNames">
<value>*ManagerImpl,*Dao,*Service,*ServiceImpl</value>
</property>
<property name="interceptorNames">
<list>
<value>transationInterceptor</value>
</list>
</property>
</bean>



上面這樣配置事務,在annotation中不啟作用的.
解決辦法正在查詢中...