zhongrj
2024-01-09 9978de3764860ec2d247bc0cd3c25a9be786456b
控制xxljob的启动
4 files modified
7 ■■■■ changed files
src/main/java/org/springblade/xxljob/config/XxlJobConfig.java 4 ●●● patch | view | raw | blame | history
src/main/resources/application-dev.yml 1 ●●●● patch | view | raw | blame | history
src/main/resources/application-prod.yml 1 ●●●● patch | view | raw | blame | history
src/main/resources/application-test.yml 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/xxljob/config/XxlJobConfig.java
@@ -4,6 +4,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -12,7 +13,8 @@
 *
 * @author liyh
 */
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty(value = "xxl.enabled")
public class XxlJobConfig {
    private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
src/main/resources/application-dev.yml
@@ -65,3 +65,4 @@
      logretentiondays: -1
      port: 7018
      address:
  enabled: false
src/main/resources/application-prod.yml
@@ -52,3 +52,4 @@
      logretentiondays: -1
      port: 7018
      address:
  enabled: true
src/main/resources/application-test.yml
@@ -52,3 +52,4 @@
      logretentiondays: -1
      port: 7018
      address:
  enabled: false