提交 fe0371bc 编写于 作者: zlt2000's avatar zlt2000

修改注入方式

上级 35fa3dba
......@@ -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表达式解析.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册