接口 TransactionAttributeSource
- 所有已知实现类:
AbstractFallbackTransactionAttributeSource
,AnnotationTransactionAttributeSource
,CompositeTransactionAttributeSource
,MatchAlwaysTransactionAttributeSource
,MethodMapTransactionAttributeSource
,NameMatchTransactionAttributeSource
public interface TransactionAttributeSource
Strategy interface used byTransactionInterceptor
for metadata retrieval.Implementations know how to source transaction attributes, whether from configuration, metadata attributes at source level (such as Java 5 annotations), or anywhere else.
- 从以下版本开始:
- 15.04.2003
- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
TransactionAspectSupport.setTransactionAttributeSource(org.springframework.transaction.interceptor.TransactionAttributeSource)
,TransactionProxyFactoryBean.setTransactionAttributeSource(org.springframework.transaction.interceptor.TransactionAttributeSource)
,AnnotationTransactionAttributeSource
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 TransactionAttribute
getTransactionAttribute(Method method, Class<?> targetClass)
Return the transaction attribute for the given method, ornull
if the method is non-transactional.
方法详细资料
getTransactionAttribute
TransactionAttribute getTransactionAttribute(Method method, Class<?> targetClass)
Return the transaction attribute for the given method, ornull
if the method is non-transactional.- 参数:
method
- the method to introspecttargetClass
- the target class (may benull
, in which case the declaring class of the method must be used)- 返回:
- the matching transaction attribute, or
null
if none found