天天看點

在Spring Boot中使用資料庫事務

一:在springboot啟動類中添加注釋 :@EnableTransactionManagement  

二:在相應地方加上注解:@Transactional 即可