Код библиотеки с аннотацией @Retryable (код библиотеки):
Код: Выделить всё
@Slf4j
@Component
public class AuthenticationClient extends BaseAuthenticationClient {
private final OpenFeignClient openfeignClient;
public AuthenticationClient(OpenFeignClient openfeignClient) {
this.openfeignClient = openfeignClient;
}
@Override
@Retryable(retryFor = RetryingException.class, maxAttempts = 6, backoff = @Backoff(delay = 300000))
public Auth getSession(Client client, int minutes) throws RetryingException {
...
}
}
Код: Выделить всё
@Slf4j
@Service
public abstract class AbstractInteractionService {
private final AuthenticationClient sessionAuthenticationClient;
public AbstractInteractionService(AuthenticationClient authenticationClient) {
this.sessionAuthenticationClient = sessionAuthenticationClient;
}
Код: Выделить всё
@Slf4j
@Service
public class InteractionService extends AbstractInteractionService {
public InteractionService(AuthenticationClient authenticationClient) {
super(authenticationClient);
}
Код: Выделить всё
openfeignClient = {AuthenticationClient$$SpringCGLIB$$0@12917} "com.client.AuthenticationClient@63d75087"
CGLIB$BOUND = false
CGLIB$CALLBACK_0 = {CglibAopProxy$DynamicAdvisedInterceptor@12939}
CGLIB$CALLBACK_1 = {CglibAopProxy$StaticUnadvisedExposedInterceptor@12940}
CGLIB$CALLBACK_2 = {CglibAopProxy$SerializableNoOp@12941}
CGLIB$CALLBACK_3 = {CglibAopProxy$StaticDispatcher@12942}
CGLIB$CALLBACK_4 = {CglibAopProxy$AdvisedDispatcher@12943}
CGLIB$CALLBACK_5 = {CglibAopProxy$EqualsInterceptor@12944}
CGLIB$CALLBACK_6 = {CglibAopProxy$HashCodeInterceptor@12945}
openfeignClient = null
- Почему наличие аннотации @Retryable предотвращает внедрение bean-компонентов?
- Как механизм прокси Spring может повлиять на внедрение bean-компонентов , и как мне обойти это, чтобы использовать @Retryable, не нарушая внедрение?
Подробнее здесь: https://stackoverflow.com/questions/781 ... ng-project