本文介绍了@Transactional和AOP之间的混淆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
@Transactional是否会在春季3取代AOP。它们是否相同?我可以说@Transactional在内部实现了AOP吗?
Does @Transactional is replacement for AOP in spring 3. are they same? Can I say @Transactional implements AOP internally ?
推荐答案
@Transactionnal
注释只是一种宣告它的简单方法方法是(或类的所有方法都是)transactionnal。
The @Transactionnal
annotation is just a simple way to declare that a method is (or all methods of a class are) transactionnal.
Spring Framework将使用AOP代理来拦截对方法的调用并管理事务。
The Spring Framework will use an AOP proxy to intercept calls to the method and manage transaction.
因此,我们可以说 @Transactionnal
在内部使用AOP。
So, we can say that @Transactionnal
use AOP internally.
更多信息
这篇关于@Transactional和AOP之间的混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!