<!-- 事务-->
<bean id="baseTxProxy" lazy-init="true" abstract="true"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyInterfaces">
<list>
<value>
com.jerry.shop.common.interfaces.IBasicShopDAO
</value>
</list>
</property>
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="transactionAttributes">
<props>
<!--
注意到<tx:method>中的属性设置,对于传播行为,隔离层级,只读,超时,异常时撤销或提交,
都对应的propagation,
isolation,timeout,read-only,rollback-for,no-rollback-for属性可以设置,
若不设置,默认值是REQUIRED,DEFAULT,-1,false
-->
<prop key="save*">PROPAGATION_REQUIRED,-Throwable</prop>
<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="delete">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
<bean id="baseTxProxy" lazy-init="true" abstract="true"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyInterfaces">
<list>
<value>
com.jerry.shop.common.interfaces.IBasicShopDAO
</value>
</list>
</property>
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="transactionAttributes">
<props>
<!--
注意到<tx:method>中的属性设置,对于传播行为,隔离层级,只读,超时,异常时撤销或提交,
都对应的propagation,
isolation,timeout,read-only,rollback-for,no-rollback-for属性可以设置,
若不设置,默认值是REQUIRED,DEFAULT,-1,false
-->
<prop key="save*">PROPAGATION_REQUIRED,-Throwable</prop>
<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="delete">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>