spring-retry icon indicating copy to clipboard operation
spring-retry copied to clipboard

About AOP implementation, such as @Retryable

Open happyxiaofan opened this issue 8 years ago • 2 comments

AspectJ (for post complier weave) or CGLIB(dynamic weave)

happyxiaofan avatar Sep 03 '17 04:09 happyxiaofan

Is that a question? Feature request? Not sure how to respond since we already use AOP for @Retryable.

dsyer avatar Dec 12 '17 08:12 dsyer

Sorry, that might be off-topic here, but I didn't want to create an issue for this question.

I'm using spring-retry for retrying in Spring Cloud Config. So I have something like:

spring:
    application:
        name: ***
    cloud:
        config:
            ...
            failFast: true
            retry:
                max-attempts: 100
                max-interval: 100000

That works like a charm, but only as long as I have spring-boot-starter-aop on the application's classpath. If I remove AOP-dependency, retry functionality is working no more. My question is: why AOP dependency is not included to Spring Retry, so it can transitively and transparently come to my application without a need to declare it explicitly?

dtitov avatar Feb 20 '18 22:02 dtitov

Spring Retry does not have transitive dependencies at all. Everything is optional and in most cases compatible with wide range of Spring versions. So, it is indeed expected that you have spring-context in your Spring Boot application which comes with a spring-aop as transitive dependency.

Closing as Works as Designed.

artembilan avatar Sep 12 '24 16:09 artembilan