From 4decfa112c149c40e896eba23b5f851866b2af71 Mon Sep 17 00:00:00 2001 From: yulongchao Date: Tue, 2 Apr 2024 16:06:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbean?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../caf/data/config/CAFPersistenceAutoConfiguration.java | 5 ++--- .../java/io/iec/edp/caf/data/filter/CAFDataFilter.java | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/config/CAFPersistenceAutoConfiguration.java b/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/config/CAFPersistenceAutoConfiguration.java index 4c4a40b6..72cbebbe 100644 --- a/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/config/CAFPersistenceAutoConfiguration.java +++ b/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/config/CAFPersistenceAutoConfiguration.java @@ -62,9 +62,8 @@ public class CAFPersistenceAutoConfiguration { // } @Bean - public CAFDataFilter cafDataFilter(ServiceUnitConfigService suAware, - DBTransactionService dbTransactionService) { - return new CAFDataFilter(suAware,dbTransactionService); + public CAFDataFilter cafDataFilter(DBTransactionService dbTransactionService) { + return new CAFDataFilter(dbTransactionService); } @Bean diff --git a/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/filter/CAFDataFilter.java b/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/filter/CAFDataFilter.java index 67f1a7d1..c73cc819 100644 --- a/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/filter/CAFDataFilter.java +++ b/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/filter/CAFDataFilter.java @@ -50,12 +50,11 @@ public class CAFDataFilter extends OncePerRequestFilter { private final Logger logger = LoggerFactory.getLogger(CAFDataFilter.class); - public CAFDataFilter(ServiceUnitConfigService suAware, - DBTransactionService dbTransactionService){ - this.suAware = suAware; + public CAFDataFilter(DBTransactionService dbTransactionService){ + this.dbTransactionService = dbTransactionService; suNames = new HashMap<>(); - for (String name : this.suAware.getEnableSu()) { + for (String name : ServiceUnitConfigService.getEnableSu()) { suNames.put(name.toLowerCase(), name); } } -- Gitee From 5f4711eda15b5687f1537a4ec116d5b2dfa37cd3 Mon Sep 17 00:00:00 2001 From: yulongchao Date: Tue, 2 Apr 2024 16:07:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbean?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iec/edp/caf/data/config/CAFPersistenceAutoConfiguration.java | 1 - .../src/main/java/io/iec/edp/caf/data/filter/CAFDataFilter.java | 1 - 2 files changed, 2 deletions(-) diff --git a/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/config/CAFPersistenceAutoConfiguration.java b/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/config/CAFPersistenceAutoConfiguration.java index 72cbebbe..72d15c53 100644 --- a/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/config/CAFPersistenceAutoConfiguration.java +++ b/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/config/CAFPersistenceAutoConfiguration.java @@ -18,7 +18,6 @@ package io.iec.edp.caf.data.config; import io.iec.caf.data.jpa.repository.support.event.CafJpaRepositoryPublish; -import io.iec.edp.caf.commons.runtime.msu.ServiceUnitConfigService; import io.iec.edp.caf.commons.transaction.Impl.DBTransactionServiceImpl; import io.iec.edp.caf.commons.transaction.repository.EcpDBTransactionWarningRepository; import io.iec.edp.caf.commons.transaction.service.DBTransactionService; diff --git a/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/filter/CAFDataFilter.java b/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/filter/CAFDataFilter.java index c73cc819..101773f2 100644 --- a/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/filter/CAFDataFilter.java +++ b/caf-boot-starters/caf-boot-starter-data/src/main/java/io/iec/edp/caf/data/filter/CAFDataFilter.java @@ -45,7 +45,6 @@ import java.util.*; public class CAFDataFilter extends OncePerRequestFilter { private Map suNames; - private ServiceUnitConfigService suAware; private DBTransactionService dbTransactionService; private final Logger logger = LoggerFactory.getLogger(CAFDataFilter.class); -- Gitee