修改注入方式

This commit is contained in:
zlt2000
2020-06-07 13:46:35 +08:00
parent 2c835da3c5
commit 5f2601bce8
@@ -7,6 +7,7 @@ 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.beans.factory.annotation.Autowired;
import org.springframework.core.DefaultParameterNameDiscoverer;
import org.springframework.expression.EvaluationContext;
import org.springframework.expression.Expression;
@@ -25,12 +26,9 @@ import org.springframework.expression.spel.support.StandardEvaluationContext;
@Slf4j
@Aspect
public class LockAspect {
@Autowired(required = false)
private DistributedLock locker;
public LockAspect(DistributedLock locker) {
this.locker = locker;
}
/**
* 用于SpEL表达式解析.
*/