springboot事务管理配置 使用springboot怎么控制事务?

使用springboot怎么控制事务?@启用事务管理//启用注释事务管理,相当于XML配置<tx:annotation-driven/>@springbootsapplicationpubli

使用springboot怎么控制事务?

@启用事务管理//启用注释事务管理,相当于XML配置<tx:annotation-driven/>@springbootsapplicationpublic类ProfiledemoApplication{@Bean公共对象testBean(PlatformTransactionManager PlatformTransactionManager){系统输出打印(“>>>>>>>>>>>”平台rmTransactionManager.getClass类().getName())return new Object()}公共静态void main(String[]args){SpringApplication.run(公关部)ofiledemoApplication.class类,args)}