Spring事务传播及数据库事务操作
从Spring 事务配置说起 先看看Spring 事务的基础配置 <aop:aspectj-autoproxy proxy-target- class = " true " /> <bean id= " transactionManager " class = " org.springframework.jdbc.datasource.DataSourceTransactionManager " > <property name= " dataSource " ref = " dataSource " /> </bean> <tx:annotation-driven transaction-manager= " transactionManager " /> <!-- 配置事务传播特性--> <tx:advice id= " transactionAdvice " transaction-manager= " transactionManager " > <tx:attributes> <tx:method name= " add* " propagation= " REQUIRED " rollback - for = " Exception,RuntimeException,SQLException "