Skip to content

Commit fe0371b

Browse files
committed
修改注入方式
1 parent 35fa3db commit fe0371b

File tree

1 file changed

+2
-4
lines changed
  • zlt-commons/zlt-common-core/src/main/java/com/central/common/lock

1 file changed

+2
-4
lines changed

zlt-commons/zlt-common-core/src/main/java/com/central/common/lock/LockAspect.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.aspectj.lang.annotation.Around;
88
import org.aspectj.lang.annotation.Aspect;
99
import org.aspectj.lang.reflect.MethodSignature;
10+
import org.springframework.beans.factory.annotation.Autowired;
1011
import org.springframework.core.DefaultParameterNameDiscoverer;
1112
import org.springframework.expression.EvaluationContext;
1213
import org.springframework.expression.Expression;
@@ -25,12 +26,9 @@
2526
@Slf4j
2627
@Aspect
2728
public class LockAspect {
29+
@Autowired(required = false)
2830
private DistributedLock locker;
2931

30-
public LockAspect(DistributedLock locker) {
31-
this.locker = locker;
32-
}
33-
3432
/**
3533
* 用于SpEL表达式解析.
3634
*/

0 commit comments

Comments
 (0)