From 7aea32f48bf91a432428de6cd98f354e1b112f26 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期四, 02 十二月 2021 18:44:24 +0800 Subject: [PATCH] !118 为Transactional注解设置rollback属性 Merge pull request !118 from zendwang/dev --- ruoyi-job/src/main/java/com/ruoyi/job/config/XxlJobConfig.java | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/ruoyi-job/src/main/java/com/ruoyi/job/config/XxlJobConfig.java b/ruoyi-job/src/main/java/com/ruoyi/job/config/XxlJobConfig.java index a4e7060..2df063e 100644 --- a/ruoyi-job/src/main/java/com/ruoyi/job/config/XxlJobConfig.java +++ b/ruoyi-job/src/main/java/com/ruoyi/job/config/XxlJobConfig.java @@ -5,8 +5,10 @@ import com.yomahub.tlog.springboot.lifecircle.TLogXxljobEnhanceInit; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; /** * xxl-job config @@ -14,8 +16,10 @@ * @author Lion Li */ @Slf4j +@Configuration @EnableConfigurationProperties(XxlJobProperties.class) @AllArgsConstructor +@ConditionalOnProperty(prefix = "xxl.job", name = "enabled", havingValue = "true") public class XxlJobConfig { private final XxlJobProperties xxlJobProperties; -- Gitblit v1.9.3