<!--================ 装配事务管理器 ================-->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<!-- ==========================事务管理模板==================== -->
<bean id="baseTransaction"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
abstract="true">
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="transactionAttributes">
<props>
<prop key="insert*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="delete*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_REQUIRED, -Exeptions</prop>
</props>
</property>
</bean>

解决方案 »

  1.   

    好古老的配置 好久不用了。。 大概意思就是 <property name="transactionManager">
    <ref bean="transactionManager" />
    </property>
    这里是从上头注入bean<property name="transactionAttributes">
    <props>
    <prop key="insert*">PROPAGATION_REQUIRED</prop>
    <prop key="update*">PROPAGATION_REQUIRED</prop>
    <prop key="delete*">PROPAGATION_REQUIRED</prop>
    <prop key="*">PROPAGATION_REQUIRED, -Exeptions</prop>
    </props>
    </property>我记得好像是拦截方法 以insert开头的事物使用的是 PROPAGATION_REQUIRED  必须开启事物
    下面同理。。 
    好像是这个意思来的 好久不用了