-
Notifications
You must be signed in to change notification settings - Fork 532
Closed
Description
Since I have no @Configuration
class in my project I tried creating an empty one just with @EnableRetry
and @Configuration
but it does not make my method use @Retryable
so I have tried these two xml configurations instead
<context:annotation-config />
<aop:aspectj-autoproxy />
<bean class="org.springframework.retry.annotation.RetryConfiguration" />
and
<aop:config>
<aop:pointcut id="transactional"
expression="execution(* com..*MyCLass.myMethod(..))" />
<aop:advisor pointcut-ref="transactional"
advice-ref="retryAdvice" order="-1"/>
</aop:config>
<bean id="retryAdvice"
class="org.springframework.retry.interceptor.RetryOperationsInterceptor"/>
But again nothing will trigger my @Retryable
method. Am I missing something? I'm using Spring 4.3.0 and I tried attaching @Retryable
to both my interface (with @Service
) and my implementation class along with @Component
Is there a way to dig deeper to see why my @Retryable
gets skipped or whether @EnableRetry
and the xml equivalent are actually doing something? I don't see any errors in my logs. It's just that the retry does not happen regardless of whether I try to configure spring-retry with xml or using annotations.