<bean id="transcationManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSourse"/>
</bean>
<tx:advice id="txadvice" transaction-manager="transcationManager">
<tx:attributes>
<tx:method name="*" propagation="REQUIRED"/>
</tx:attributes>
</tx:advice>
<!--aop织入-->
<aop:config>
<aop:pointcut id="txPointCut" expression="execution(* com.shida.Mapper.*.*(..))"/>
<aop:advisor advice-ref="txadvice" pointcut-ref="txPointCut"/>
</aop:config>