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)