From ffe75e111eb333236e923a1ed14dae5257b09357 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Thu, 1 Aug 2024 21:59:19 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=BC=80=E5=8F=91=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=85=B3=E9=97=AD=E4=BB=BB=E5=8A=A1=E8=B0=83?= =?UTF-8?q?=E5=BA=A6=E9=85=8D=E7=BD=AE=EF=BC=8C=E5=B9=B6=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=B0=83=E5=BA=A6=E6=9C=8D=E5=8A=A1=E7=AB=AF?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=90=8D=E7=A7=B0=E4=BB=A5=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ntinewAdminJobApplication.java => JobServerApplication.java} | 2 +- .../top/continew/admin/job/config/SnailJobConfiguration.java | 2 ++ .../src/main/resources/config/application-dev.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) rename continew-admin-extension/continew-admin-job-server/src/main/java/top/continew/admin/extension/job/{ContinewAdminJobApplication.java => JobServerApplication.java} (96%) diff --git a/continew-admin-extension/continew-admin-job-server/src/main/java/top/continew/admin/extension/job/ContinewAdminJobApplication.java b/continew-admin-extension/continew-admin-job-server/src/main/java/top/continew/admin/extension/job/JobServerApplication.java similarity index 96% rename from continew-admin-extension/continew-admin-job-server/src/main/java/top/continew/admin/extension/job/ContinewAdminJobApplication.java rename to continew-admin-extension/continew-admin-job-server/src/main/java/top/continew/admin/extension/job/JobServerApplication.java index 99d9ff8ab..67cd53261 100644 --- a/continew-admin-extension/continew-admin-job-server/src/main/java/top/continew/admin/extension/job/ContinewAdminJobApplication.java +++ b/continew-admin-extension/continew-admin-job-server/src/main/java/top/continew/admin/extension/job/JobServerApplication.java @@ -26,7 +26,7 @@ * @since 2024/6/25 22:24 */ @SpringBootApplication -public class ContinewAdminJobApplication { +public class JobServerApplication { public static void main(String[] args) { SpringApplication.run(com.aizuda.snailjob.server.SnailJobServerApplication.class, args); diff --git a/continew-admin-plugins/continew-admin-job/src/main/java/top/continew/admin/job/config/SnailJobConfiguration.java b/continew-admin-plugins/continew-admin-job/src/main/java/top/continew/admin/job/config/SnailJobConfiguration.java index 04cb721ea..d61020e3c 100644 --- a/continew-admin-plugins/continew-admin-job/src/main/java/top/continew/admin/job/config/SnailJobConfiguration.java +++ b/continew-admin-plugins/continew-admin-job/src/main/java/top/continew/admin/job/config/SnailJobConfiguration.java @@ -23,6 +23,7 @@ import com.aizuda.snailjob.client.common.event.SnailClientStartingEvent; import com.aizuda.snailjob.client.starter.EnableSnailJob; import org.slf4j.LoggerFactory; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Configuration; import org.springframework.context.event.EventListener; @@ -34,6 +35,7 @@ */ @Configuration @EnableSnailJob +@ConditionalOnProperty(prefix = "snail-job", value = "enabled", havingValue = "true", matchIfMissing = true) public class SnailJobConfiguration { /** diff --git a/continew-admin-webapi/src/main/resources/config/application-dev.yml b/continew-admin-webapi/src/main/resources/config/application-dev.yml index f77d05ef7..69dd00577 100644 --- a/continew-admin-webapi/src/main/resources/config/application-dev.yml +++ b/continew-admin-webapi/src/main/resources/config/application-dev.yml @@ -289,6 +289,7 @@ avatar: --- ### Snail Job 配置 snail-job: + enabled: false # 客户端地址(默认自动获取本机 IP) #host: 127.0.0.1 # 客户端端口(默认:1789)