From 808ff6abb9ec21d1cf233f527123b85073f5dfc3 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 16 Sep 2023 13:14:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E7=A6=81=E7=94=A8=20lock4j?= =?UTF-8?q?=20=E4=BE=9D=E8=B5=96=EF=BC=8C=E4=BF=9D=E8=AF=81=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-framework/yudao-spring-boot-starter-protection/pom.xml | 1 + .../yudao/framework/lock4j/config/YudaoLock4jConfiguration.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/yudao-framework/yudao-spring-boot-starter-protection/pom.xml b/yudao-framework/yudao-spring-boot-starter-protection/pom.xml index 5e19511c4..e4e970f29 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-protection/pom.xml @@ -26,6 +26,7 @@ com.baomidou lock4j-redisson-spring-boot-starter + true diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/config/YudaoLock4jConfiguration.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/config/YudaoLock4jConfiguration.java index 2fc7f21ea..f9b883cd9 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/config/YudaoLock4jConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/config/YudaoLock4jConfiguration.java @@ -3,9 +3,11 @@ package cn.iocoder.yudao.framework.lock4j.config; import cn.iocoder.yudao.framework.lock4j.core.DefaultLockFailureStrategy; import com.baomidou.lock.spring.boot.autoconfigure.LockAutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.context.annotation.Bean; @AutoConfiguration(before = LockAutoConfiguration.class) +@ConditionalOnClass(name = "com.baomidou.lock.annotation.Lock4j") public class YudaoLock4jConfiguration { @Bean