类 TransactionAttributeSourceAdvisor
- java.lang.Object
- org.springframework.aop.support.AbstractPointcutAdvisor
- org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor
- 所有已实现的接口:
Serializable
,Advisor
,PointcutAdvisor
,Ordered
public class TransactionAttributeSourceAdvisor extends AbstractPointcutAdvisor
Advisor driven by aTransactionAttributeSource
, used to include aTransactionInterceptor
only for methods that are transactional.Because the AOP framework caches advice calculations, this is normally faster than just letting the TransactionInterceptor run and find out itself that it has no work to do.
- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
setTransactionInterceptor(org.springframework.transaction.interceptor.TransactionInterceptor)
,TransactionProxyFactoryBean
, 序列化表格
字段概要
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 TransactionAttributeSourceAdvisor()
Create a new TransactionAttributeSourceAdvisor.TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor)
Create a new TransactionAttributeSourceAdvisor.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Advice
getAdvice()
Return the advice part of this aspect.Pointcut
getPointcut()
Get the Pointcut that drives this advisor.void
setClassFilter(ClassFilter classFilter)
Set theClassFilter
to use for this pointcut.void
setTransactionInterceptor(TransactionInterceptor interceptor)
Set the transaction interceptor to use for this advisor.从类继承的方法 org.springframework.aop.support.AbstractPointcutAdvisor
equals, getOrder, hashCode, isPerInstance, setOrder
构造器详细资料
TransactionAttributeSourceAdvisor
public TransactionAttributeSourceAdvisor()
Create a new TransactionAttributeSourceAdvisor.
TransactionAttributeSourceAdvisor
public TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor)
Create a new TransactionAttributeSourceAdvisor.- 参数:
interceptor
- the transaction interceptor to use for this advisor
方法详细资料
setTransactionInterceptor
public void setTransactionInterceptor(TransactionInterceptor interceptor)
Set the transaction interceptor to use for this advisor.
setClassFilter
public void setClassFilter(ClassFilter classFilter)
Set theClassFilter
to use for this pointcut. Default isClassFilter.TRUE
.
getAdvice
public Advice getAdvice()
从接口复制的说明:Advisor
Return the advice part of this aspect. An advice may be an interceptor, a before advice, a throws advice, etc.- 返回:
- the advice that should apply if the pointcut matches
- 另请参阅:
MethodInterceptor
,BeforeAdvice
,ThrowsAdvice
,AfterReturningAdvice
getPointcut
public Pointcut getPointcut()
从接口复制的说明:PointcutAdvisor
Get the Pointcut that drives this advisor.