ibatis+spring事务配置
<!-- ibatis2.3 + spring2.5 --> <bean id="sqlMapClientTemplate" ref="ibatis_client"/> </bean><!-- 定义事务管理器 --> <bean id="transactionManager" ref="dataSource" /> </bean> <!-- 事务代理基类 --> <bean id="baseTransactionProxy" ref="transactionManager"/> </bean> <!-- dao --> <bean id="carBookTaxiDao" ref="sqlMapClientTemplate"/> </bean> <!-- 添加事务的service --> <bean id="carBookTaxiServiceTarget" ref="carBookTaxiDao"/> </bean> <bean id="carBookTaxiService" parent="baseTransactionProxy"> <property name="target" ref="carBookTaxiServiceTarget"/> <property name="transactionAttributes"> <props> <prop key="add*">PROPAGATION_REQUIRED</prop> </props> </property> </bean> <!--Dao抛出Exception,service捕获并回滚-->参考文章:http://www.zjsyc.com/blog/article/spring/394.htmlhttp://jackandroid.iteye.com/blog/614620?