事务其实也是基于AOP切面实现的。我们可以直接使用注解,开启事务管理功能: @Configuration @ComponentScan("com.wml") @Import({JdbcConfig.class,TransactionConfig.class}) @PropertySource(value = "JdbcConfig.properties") @EnableTransactionManagement public class SpringConfiguration { } 主要是@EnableTransactionManagement注解开...