Class TransactionInterceptor
- java.lang.Object
-
- org.springframework.transaction.interceptor.TransactionAspectSupport
-
- io.micronaut.spring.tx.annotation.TransactionInterceptor
-
- All Implemented Interfaces:
io.micronaut.aop.Interceptor<java.lang.Object,java.lang.Object>
,io.micronaut.aop.MethodInterceptor<java.lang.Object,java.lang.Object>
,io.micronaut.core.order.Ordered
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.InitializingBean
@InterceptorBean(org.springframework.transaction.annotation.Transactional.class) @Requires(missingBeans=org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration.class) public class TransactionInterceptor extends org.springframework.transaction.interceptor.TransactionAspectSupport implements io.micronaut.aop.MethodInterceptor<java.lang.Object,java.lang.Object>
Simple interceptor to forTransactional
.- Since:
- 1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.springframework.transaction.interceptor.TransactionAspectSupport
org.springframework.transaction.interceptor.TransactionAspectSupport.CoroutinesInvocationCallback, org.springframework.transaction.interceptor.TransactionAspectSupport.InvocationCallback, org.springframework.transaction.interceptor.TransactionAspectSupport.TransactionInfo
-
-
Constructor Summary
Constructors Constructor Description TransactionInterceptor(io.micronaut.context.BeanLocator beanLocator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
int
getOrder()
java.lang.Object
intercept(io.micronaut.aop.MethodInvocationContext<java.lang.Object,java.lang.Object> context)
protected org.springframework.transaction.interceptor.TransactionAttribute
resolveTransactionAttribute(io.micronaut.inject.ExecutableMethod<java.lang.Object,java.lang.Object> targetMethod, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, java.lang.String transactionManagerName)
-
Methods inherited from class org.springframework.transaction.interceptor.TransactionAspectSupport
cleanupTransactionInfo, clearTransactionManagerCache, commitTransactionAfterReturning, completeTransactionAfterThrowing, createTransactionIfNecessary, currentTransactionInfo, currentTransactionStatus, determineTransactionManager, getBeanFactory, getTransactionAttributeSource, getTransactionManager, getTransactionManagerBeanName, invokeWithinTransaction, methodIdentification, prepareTransactionInfo, setBeanFactory, setTransactionAttributes, setTransactionAttributeSource, setTransactionAttributeSources, setTransactionManager, setTransactionManagerBeanName
-
-
-
-
Method Detail
-
getOrder
public int getOrder()
- Specified by:
getOrder
in interfaceio.micronaut.core.order.Ordered
-
intercept
public final java.lang.Object intercept(io.micronaut.aop.MethodInvocationContext<java.lang.Object,java.lang.Object> context)
- Specified by:
intercept
in interfaceio.micronaut.aop.MethodInterceptor<java.lang.Object,java.lang.Object>
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classorg.springframework.transaction.interceptor.TransactionAspectSupport
-
resolveTransactionAttribute
protected org.springframework.transaction.interceptor.TransactionAttribute resolveTransactionAttribute(io.micronaut.inject.ExecutableMethod<java.lang.Object,java.lang.Object> targetMethod, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, java.lang.String transactionManagerName)
- Parameters:
targetMethod
- The target methodannotationMetadata
- The annotation metadatatransactionManagerName
- The transaction manager- Returns:
- The
TransactionAttribute
-
-