
com.alibaba.easyretry.extension.spring.aop.RetryInterceptor Maven / Gradle / Ivy
The newest version!
package com.alibaba.easyretry.extension.spring.aop;
import java.lang.reflect.Method;
import java.util.Objects;
import com.alibaba.easyretry.common.RetryConfiguration;
import com.alibaba.easyretry.common.RetryIdentify;
import com.alibaba.easyretry.common.retryer.Retryer;
import com.alibaba.easyretry.core.RetryerBuilder;
import com.alibaba.easyretry.extension.spring.SPELResultPredicate;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.context.ApplicationContext;
@Aspect
public class RetryInterceptor {
@Setter
private RetryConfiguration retryConfiguration;
@Setter
private ApplicationContext applicationContext;
@Around("@annotation(retryable)")
public Object around(ProceedingJoinPoint invocation, EasyRetryable retryable) throws Throwable {
if (RetryIdentify.isOnRetry()) {
return invocation.proceed();
}
Retryer
© 2015 - 2025 Weber Informatics LLC | Privacy Policy