声明式事务(注解) 在启动类中加上@EnableTransactionManagement注解,开启注解事务 spring boot应该会自动开启注解事务配置,这里没有试验过,加上注解准没错 @SpringBootApplication @EnableTransactionManagement public class AppStarter{ public static void main(String[] args) { System