简体   繁体   English

Spring @Service是事务性的吗?

[英]Is Spring @Service transactional?

When I am on a spring service and I want to update several database tables through spring repositories, do I need to add @Transactional to make sure I am transactional and rollback or is it already there? 当我使用spring服务时,我想通过spring存储库更新几个数据库表,我是否需要添加@Transactional以确保我具有事务性和回滚功能,或者它已经存在? If yes, do I need to add it to the class level or method? 如果是,是否需要将其添加到类级别或方法?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM