Spring-boot教程(五)事物管理

ssh ssm都有事务管理service层通过applicationContext.xml配置,所有service方法都加上事务操作;

用来保证一致性,即service方法里的多个dao操作,要么同时成功,要么同时失败;

springboot下的话,只需要在service层的service方法上加上@Transactional即可

猜你喜欢

转载自blog.csdn.net/wqc19920906/article/details/81587640