Spring - @Transactional - What happens in background?

前端 未结 6 487
逝去的感伤
逝去的感伤 2020-11-22 07:17

I want to know what actually happens when you annotate a method with @Transactional? Of course, I know that Spring will wrap that method in a Transaction.

6条回答
  •  花落未央
    2020-11-22 08:07

    All existing answers are correct, but I feel cannot give just this complex topic.

    For a comprehensive, practical explanation you might want to have a look at this Spring @Transactional In-Depth guide, which tries its best to cover transaction management in ~4000 simple words, with a lot of code examples.

提交回复
热议问题