V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
projectCloud
V2EX  ›  程序员

有没有用 Seata 的,方法上使用了 @GlobalTransactional 注解之后,@Transactional 还有用吗?

  •  1
     
  •   projectCloud · Jan 18, 2022 · 984 views
    This topic created in 1573 days ago, the information mentioned may be changed or developed.

    经常可以看到两者同时使用的写法,在这里 @Transactional 有什么意义?一般不是只需要一个 @GlobalTransactional 就可以了吗?

    @Override
    @GlobalTransactional(rollbackFor = {Exception.class})
    @Transactional(rollbackFor = {Exception.class})
    public boolean deleteBed(Long bedId) {
        return this.removeById(bedId);
    }
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   872 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 21:39 · PVG 05:39 · LAX 14:39 · JFK 17:39
    ♥ Do have faith in what you're doing.