diff --git a/pom.xml b/pom.xml index 479a474..89317cb 100644 --- a/pom.xml +++ b/pom.xml @@ -216,11 +216,12 @@ org.apache.maven.plugins maven-compiler-plugin - 3.1 + 3.8.1 ${java.version} ${java.version} ${project.build.sourceEncoding} + true diff --git a/sync-admin/src/main/java/com/lyr/web/controller/tool/DataSourceManagerController.java b/sync-admin/src/main/java/com/lyr/web/controller/tool/DataSourceManagerController.java index 0fb2229..e88766d 100644 --- a/sync-admin/src/main/java/com/lyr/web/controller/tool/DataSourceManagerController.java +++ b/sync-admin/src/main/java/com/lyr/web/controller/tool/DataSourceManagerController.java @@ -1,11 +1,7 @@ package com.lyr.web.controller.tool; -import com.lyr.framework.manager.DataSourceManagerService; -import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; - /** * @author liyc * @date 2024/10/30 diff --git a/sync-common/src/main/java/com/lyr/common/annotation/DataSource.java b/sync-common/src/main/java/com/lyr/common/annotation/DataSource.java index 94468e6..d159fd9 100644 --- a/sync-common/src/main/java/com/lyr/common/annotation/DataSource.java +++ b/sync-common/src/main/java/com/lyr/common/annotation/DataSource.java @@ -16,8 +16,18 @@ import java.lang.annotation.*; @Documented @Inherited public @interface DataSource { + /** * 切换数据源名称 */ DataSourceType value() default DataSourceType.MASTER; + + /** + * 数据源名称 (优先使用这个数据源,否则使用value) + * + * @return + */ + String name() default ""; + + } diff --git a/sync-common/src/main/java/com/lyr/common/enums/DataSourceType.java b/sync-common/src/main/java/com/lyr/common/enums/DataSourceType.java index 5f84803..e4e1cb0 100644 --- a/sync-common/src/main/java/com/lyr/common/enums/DataSourceType.java +++ b/sync-common/src/main/java/com/lyr/common/enums/DataSourceType.java @@ -14,5 +14,11 @@ public enum DataSourceType { /** * 从库 */ - SLAVE + SLAVE, + + /** + * 外部 + */ + EXTERNAL + } diff --git a/sync-common/src/main/java/com/lyr/common/utils/AssertUtil.java b/sync-common/src/main/java/com/lyr/common/utils/AssertUtil.java new file mode 100644 index 0000000..6f1c659 --- /dev/null +++ b/sync-common/src/main/java/com/lyr/common/utils/AssertUtil.java @@ -0,0 +1,104 @@ +package com.lyr.common.utils; + + +import com.lyr.common.exception.ServiceException; +import org.apache.poi.ss.formula.functions.T; +import org.springframework.util.CollectionUtils; + +import java.util.Collection; +import java.util.List; + +/** + * @author Admin + */ +public class AssertUtil { + + + public static void notEmpty(Long val, String s, Integer... codes) throws ServiceException { + if (val == null) { + Integer code = (codes.length == 0) ? 500 : codes[0]; + throw new ServiceException(s, code); + } + } + + public static void notEmpty(Collection c, String s, Integer... codes) throws ServiceException { + if (CollectionUtils.isEmpty(c)) { + Integer code = (codes.length == 0) ? 500 : codes[0]; + throw new ServiceException(s, code); + } + } + + public static void notEmpty(String val, String s, Integer... codes) throws ServiceException { + if (StringUtils.isEmpty(val)) { + Integer code = (codes.length == 0) ? 500 : codes[0]; + throw new ServiceException(s, code); + } + } + + public static void notEmpty(Object val, String s, Integer... codes) throws ServiceException { + if (val == null) { + Integer code = (codes.length == 0) ? 500 : codes[0]; + throw new ServiceException(s, code); + } + } + + /** + * 不为空时抛出异常信息 + * + * @param obj + * @param s + */ + public static void empty(Object obj, String s, Integer... codes) { + if (null != obj) { + Integer code = (codes.length == 0) ? 500 : codes[0]; + throw new ServiceException(s, code); + } + } + + public static void empty(Object obj, String s, List t, Integer... codes) { + if (null != obj) { + Integer code = (codes.length == 0) ? 500 : codes[0]; + throw new ServiceException(s, code); + } + } + + public static void empty(Collection c, String s) { + if (!CollectionUtils.isEmpty(c)) { + throw new ServiceException(s, 500); + } + } + + public static void notEqual(boolean val, String s, Integer... codes) { + if (val) { + Integer code = (codes.length == 0) ? 500 : codes[0]; + throw new ServiceException(s, code); + } + } + + public static void equal(boolean val, String s) { + notEqual(!val, s); + } + + + public static void isFalse(boolean b, String s, Integer... codes) { + if (b) { + Integer code = (codes.length == 0) ? 500 : codes[0]; + throw new ServiceException(s, code); + } + } + + public static void isTrue(boolean b, String s, Integer... codes) throws ServiceException { + if (!b) { + Integer code = (codes.length == 0) ? 500 : codes[0]; + throw new ServiceException(s, code); + } + } + + + public static void test() { + throw new ServiceException("222"); + } +} + + + diff --git a/sync-common/src/main/java/com/lyr/common/utils/SpElUtil.java b/sync-common/src/main/java/com/lyr/common/utils/SpElUtil.java new file mode 100644 index 0000000..f89c25c --- /dev/null +++ b/sync-common/src/main/java/com/lyr/common/utils/SpElUtil.java @@ -0,0 +1,49 @@ +package com.lyr.common.utils; + +import org.springframework.context.annotation.Bean; +import org.springframework.expression.ExpressionParser; +import org.springframework.expression.spel.standard.SpelExpressionParser; +import org.springframework.expression.spel.support.StandardEvaluationContext; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.lang.reflect.Method; +import java.lang.reflect.Parameter; + +/** + * spel 工具类 + * + * @author liyc + * @date 2024/10/30 + * @description TODO + **/ +@Component +public class SpElUtil { + + @Resource + public ExpressionParser expressionParser; + + @Bean + public ExpressionParser expressionParser() { + return new SpelExpressionParser(); + } + + + /** + * 解析表达式 + * + * @param method + * @param args + * @param expression + * @return + */ + public String parseExpression(Method method, Object[] args, String expression) { + StandardEvaluationContext context = new StandardEvaluationContext(); + Parameter[] parameters = method.getParameters(); + for (int i = 0; i < parameters.length; i++) { + Parameter parameter = parameters[i]; + context.setVariable(parameter.getName(), args[i]); + } + return expressionParser.parseExpression(expression).getValue(context, String.class); + } +} diff --git a/sync-common/target/classes/com/lyr/common/annotation/DataSource.class b/sync-common/target/classes/com/lyr/common/annotation/DataSource.class index d35eb21..e3a497b 100644 Binary files a/sync-common/target/classes/com/lyr/common/annotation/DataSource.class and b/sync-common/target/classes/com/lyr/common/annotation/DataSource.class differ diff --git a/sync-common/target/classes/com/lyr/common/enums/DataSourceType.class b/sync-common/target/classes/com/lyr/common/enums/DataSourceType.class index f0f26a3..2c2f0a1 100644 Binary files a/sync-common/target/classes/com/lyr/common/enums/DataSourceType.class and b/sync-common/target/classes/com/lyr/common/enums/DataSourceType.class differ diff --git a/sync-framework/pom.xml b/sync-framework/pom.xml index edf5d4b..4fe857d 100644 --- a/sync-framework/pom.xml +++ b/sync-framework/pom.xml @@ -74,6 +74,11 @@ com.lyr sync-system + + org.projectlombok + lombok + provided + diff --git a/sync-framework/src/main/java/com/lyr/framework/aspectj/DataSourceAspect.java b/sync-framework/src/main/java/com/lyr/framework/aspectj/DataSourceAspect.java index 2c86407..85c9c35 100644 --- a/sync-framework/src/main/java/com/lyr/framework/aspectj/DataSourceAspect.java +++ b/sync-framework/src/main/java/com/lyr/framework/aspectj/DataSourceAspect.java @@ -1,8 +1,11 @@ package com.lyr.framework.aspectj; import com.lyr.common.annotation.DataSource; +import com.lyr.common.exception.ServiceException; +import com.lyr.common.utils.SpElUtil; import com.lyr.common.utils.StringUtils; import com.lyr.framework.datasource.DynamicDataSourceContextHolder; +import com.lyr.framework.manager.DataSourceManager; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; @@ -14,6 +17,8 @@ import org.springframework.core.annotation.AnnotationUtils; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; +import javax.annotation.Resource; +import java.lang.reflect.Method; import java.util.Objects; /** @@ -27,28 +32,46 @@ import java.util.Objects; public class DataSourceAspect { protected Logger logger = LoggerFactory.getLogger(getClass()); - @Pointcut("@annotation(com.lyr.common.annotation.DataSource)" - + "|| @within(com.lyr.common.annotation.DataSource)") + @Resource + private SpElUtil spElUtil; + @Resource + private DataSourceManager dataSourceManager; + + @Pointcut("@annotation(com.lyr.common.annotation.DataSource)" + "|| @within(com.lyr.common.annotation.DataSource)") public void dsPointCut() { } @Around("dsPointCut()") public Object around(ProceedingJoinPoint point) throws Throwable { + String value = null; DataSource dataSource = getDataSource(point); - if (StringUtils.isNotNull(dataSource)) { - DynamicDataSourceContextHolder.setDataSourceType(dataSource.value().name()); + value = dataSource.value().name(); + String name = dataSource.name(); + if (StringUtils.isNotEmpty(name)) { + // 解析spEl表达式 + Object[] args = point.getArgs(); + MethodSignature signature = (MethodSignature) point.getSignature(); + Method method = signature.getMethod(); + value = spElUtil.parseExpression(method, args, dataSource.name()); + } + DynamicDataSourceContextHolder.setDataSourceType(value); } - try { return point.proceed(); + } catch (Exception e) { + logger.error("数据源切换失败", e); + logger.debug("要切换的数据源:{}", value); + dataSourceManager.print(); + throw new ServiceException("切换数据源到[" + value + "]失败"); } finally { // 销毁数据源 在执行方法之后 DynamicDataSourceContextHolder.clearDataSourceType(); } } + /** * 获取需要切换的数据源 */ @@ -58,7 +81,8 @@ public class DataSourceAspect { if (Objects.nonNull(dataSource)) { return dataSource; } - return AnnotationUtils.findAnnotation(signature.getDeclaringType(), DataSource.class); } + + } diff --git a/sync-framework/src/main/java/com/lyr/framework/datasource/DynamicDataSource.java b/sync-framework/src/main/java/com/lyr/framework/datasource/DynamicDataSource.java index f0f9e6f..1a2f980 100644 --- a/sync-framework/src/main/java/com/lyr/framework/datasource/DynamicDataSource.java +++ b/sync-framework/src/main/java/com/lyr/framework/datasource/DynamicDataSource.java @@ -1,10 +1,9 @@ package com.lyr.framework.datasource; -import com.alibaba.druid.pool.DruidDataSource; import com.lyr.common.utils.spring.SpringUtils; +import lombok.extern.slf4j.Slf4j; import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; -import javax.sql.DataSource; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -13,6 +12,7 @@ import java.util.concurrent.ConcurrentHashMap; * * @author ruoyi */ +@Slf4j public class DynamicDataSource extends AbstractRoutingDataSource { private static Map targetDataSources = new ConcurrentHashMap<>(); @@ -28,23 +28,28 @@ public class DynamicDataSource extends AbstractRoutingDataSource { } - public DynamicDataSource(DataSource defaultTargetDataSource, Map targetDataSources) { - super.setDefaultTargetDataSource(defaultTargetDataSource); - super.setTargetDataSources(targetDataSources); - super.afterPropertiesSet(); - } - + /** + * 添加数据源 + * + * @param key + * @param dataSource + */ public void addTargetDataSource(Object key, Object dataSource) { - if (dataSource instanceof String) { - try { - SpringUtils.getBean(dataSource.toString()); + try { + if (dataSource instanceof String) { + try { + SpringUtils.getBean(dataSource.toString()); + this.targetDataSources.put(key, dataSource); + } catch (Exception e) { + } + } else { this.targetDataSources.put(key, dataSource); - } catch (Exception e) { } - } else { - this.targetDataSources.put(key, dataSource); + super.afterPropertiesSet(); // 重新初始化数据源 + } catch (Exception e) { + log.error("添加数据源失败", e); + throw new RuntimeException(e); } - super.afterPropertiesSet(); // 重新初始化数据源 } @@ -53,13 +58,5 @@ public class DynamicDataSource extends AbstractRoutingDataSource { super.afterPropertiesSet(); // 重新初始化数据源 } - public void print() { - DruidDataSource resolvedDefaultDataSource = (DruidDataSource) getResolvedDefaultDataSource(); - System.out.println("主数据源:" + resolvedDefaultDataSource.getUrl()); - Map resolvedDataSources = getResolvedDataSources(); - for (Map.Entry entry : resolvedDataSources.entrySet()) { - DruidDataSource value = (DruidDataSource) entry.getValue(); - System.out.println("数据源[" + entry.getKey() + "]:" + value.getUrl()); - } - } + } \ No newline at end of file diff --git a/sync-framework/src/main/java/com/lyr/framework/datasource/DynamicDataSourceContextHolder.java b/sync-framework/src/main/java/com/lyr/framework/datasource/DynamicDataSourceContextHolder.java index db8fa19..e9f2eb8 100644 --- a/sync-framework/src/main/java/com/lyr/framework/datasource/DynamicDataSourceContextHolder.java +++ b/sync-framework/src/main/java/com/lyr/framework/datasource/DynamicDataSourceContextHolder.java @@ -9,6 +9,8 @@ import org.slf4j.LoggerFactory; * @author ruoyi */ public class DynamicDataSourceContextHolder { + + public static final Logger log = LoggerFactory.getLogger(DynamicDataSourceContextHolder.class); /** diff --git a/sync-framework/src/main/java/com/lyr/framework/manager/DataSourceManager.java b/sync-framework/src/main/java/com/lyr/framework/manager/DataSourceManager.java new file mode 100644 index 0000000..24f3960 --- /dev/null +++ b/sync-framework/src/main/java/com/lyr/framework/manager/DataSourceManager.java @@ -0,0 +1,130 @@ +package com.lyr.framework.manager; + +import com.alibaba.druid.pool.DruidDataSource; +import com.lyr.common.exception.ServiceException; +import com.lyr.common.utils.AssertUtil; +import com.lyr.framework.datasource.DynamicDataSource; +import com.lyr.framework.datasource.DynamicDataSourceContextHolder; +import lombok.extern.slf4j.Slf4j; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import javax.sql.DataSource; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * @author liyc + * @date 2024/10/30 + * @description TODO + **/ +@Slf4j +@Component +public class DataSourceManager { + + @Resource + private DynamicDataSource dynamicDataSource; + + + public enum RegisterType { + LOAD, ADD; + } + + + /** + * 配置数据源默认参数 + * + * @param dataSource + * @param registerType 注册类型 + */ + public void defaultDataSourceConfiguration(DruidDataSource dataSource, RegisterType registerType) { + String dataSourceName = dataSource.getName(); + AssertUtil.notEmpty(dataSourceName, "数据源名称不能为空"); + // 配置数据源参数 + dataSource.setInitialSize(5); + dataSource.setMinIdle(10); + dataSource.setMaxActive(20); + dataSource.setMaxWait(60000); + dataSource.setConnectTimeout(30000); + dataSource.setSocketTimeout(60000); + dataSource.setTimeBetweenEvictionRunsMillis(60000); + dataSource.setMinEvictableIdleTimeMillis(300000); + dataSource.setMaxEvictableIdleTimeMillis(900000); + dataSource.setValidationQuery("SELECT 1"); + dataSource.setTestOnBorrow(false); + try { + DataSource resolvedDefaultDataSource = dynamicDataSource.getResolvedDefaultDataSource(); + // 设置默认数据源 + dynamicDataSource.setDefaultTargetDataSource(resolvedDefaultDataSource); + // 添加数据源 + dynamicDataSource.addTargetDataSource(dataSourceName, dataSource); + // 测试数据源连接 + this.testDataSourceConnection(dataSource, registerType); + } catch (ServiceException e) { + dataSource.close(); + throw new ServiceException(e.getMessage()); + } catch (Exception ex) { + String name = registerType.name(); + String message = String.format("【%s】数据源配置失败", name); + log.error(message, ex); + dataSource.close(); + throw new ServiceException(message); + } + } + + + /** + * 测试数据源连接 + * + * @param dataSource + * @param registerType + */ + private void testDataSourceConnection(DruidDataSource dataSource, RegisterType registerType) { + String dataSourceName = dataSource.getName(); + int compareTo = RegisterType.LOAD.compareTo(registerType); + String message = String.format("数据源连接测试未通过 %s", + (compareTo == 0 ? "排查表参数: data_source_config" : "请手动测试数据源是否正确")); + try (Connection connection = dataSource.getConnection()) { + JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); + Integer result = jdbcTemplate.queryForObject("SELECT 1", Integer.class); + if (result != null && result == 1) { + log.info(String.format("数据源连接测试通过", dataSourceName)); + } else { + log.error(message); + throw new ServiceException(message); + } + } catch (SQLException e) { + log.error(message, e); + // 销毁数据源 + DynamicDataSourceContextHolder.clearDataSourceType(); + throw new ServiceException(message); + } + } + + + public void print() { + log.debug("=======================开始打印数据源信息============================="); + // 获取默认数据源 + DruidDataSource resolvedDefaultDataSource = (DruidDataSource) dynamicDataSource.getResolvedDefaultDataSource(); + if (resolvedDefaultDataSource != null) { + log.debug("主数据源: {}", resolvedDefaultDataSource.getUrl()); + } else { + log.debug("主数据源: 未设置"); + } + // 获取所有数据源 + Map resolvedDataSources = dynamicDataSource.getResolvedDataSources(); + AtomicInteger index = new AtomicInteger(0); + for (Map.Entry entry : resolvedDataSources.entrySet()) { + DruidDataSource value = (DruidDataSource) entry.getValue(); + log.debug("数据源[{}]: {} {}", index.getAndIncrement(), entry.getKey(), value.getUrl()); + } + log.debug("=======================打印数据源信息结束============================="); + } + + + + +} diff --git a/sync-framework/src/main/java/com/lyr/framework/manager/DataSourceManagerService.java b/sync-framework/src/main/java/com/lyr/framework/manager/DataSourceManagerService.java deleted file mode 100644 index df1fe2a..0000000 --- a/sync-framework/src/main/java/com/lyr/framework/manager/DataSourceManagerService.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.lyr.framework.manager; - -import com.lyr.framework.datasource.DynamicDataSource; -import org.springframework.beans.BeansException; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; -import javax.sql.DataSource; - -/** - * @author liyc - * @date 2024/10/30 - * @description TODO - **/ -@Component -public class DataSourceManagerService implements ApplicationContextAware { - - private ApplicationContext applicationContext; - @Resource - private DynamicDataSource dynamicDataSource; - - - @Override - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { - this.applicationContext = applicationContext; - } - - public void print() { - dynamicDataSource.print(); - } - - - public void registerDataSources(String beanName, DataSource dataSource) { - DataSource resolvedDefaultDataSource = dynamicDataSource.getResolvedDefaultDataSource(); - dynamicDataSource.setDefaultTargetDataSource(resolvedDefaultDataSource); - dynamicDataSource.addTargetDataSource(beanName, dataSource); - } - - public void add() { - /* // 构建数据源 - DruidDataSource dataSource = new DruidDataSource(); - dataSource.setUrl("jdbc:sqlserver://192.168.3.28:1433;DatabaseName=BiDataDeYue;encrypt=true;trustServerCertificate=true;"); - dataSource.setUsername("sa"); - dataSource.setPassword("mssql_whdZeB"); - dataSource.setDriverClassName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); - try { - DataSource resolvedDefaultDataSource = dynamicDataSource.getResolvedDefaultDataSource(); - dynamicDataSource.setDefaultTargetDataSource(resolvedDefaultDataSource); - dynamicDataSource.addTargetDataSource("deYueMssql", dataSource); - } catch (BeansException e) { - }*/ - } - - -} diff --git a/sync-framework/src/main/java/com/lyr/framework/web/service/SysLoginService.java b/sync-framework/src/main/java/com/lyr/framework/web/service/SysLoginService.java index 778e749..fed18eb 100644 --- a/sync-framework/src/main/java/com/lyr/framework/web/service/SysLoginService.java +++ b/sync-framework/src/main/java/com/lyr/framework/web/service/SysLoginService.java @@ -13,7 +13,6 @@ import com.lyr.common.utils.MessageUtils; import com.lyr.common.utils.StringUtils; import com.lyr.common.utils.ip.IpUtils; import com.lyr.framework.manager.AsyncManager; -import com.lyr.framework.manager.DataSourceManagerService; import com.lyr.framework.manager.factory.AsyncFactory; import com.lyr.framework.security.context.AuthenticationContextHolder; import com.lyr.system.service.ISysConfigService; diff --git a/sync-framework/target/classes/com/lyr/framework/aspectj/DataScopeAspect.class b/sync-framework/target/classes/com/lyr/framework/aspectj/DataScopeAspect.class index ed4e22a..916e62a 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/aspectj/DataScopeAspect.class and b/sync-framework/target/classes/com/lyr/framework/aspectj/DataScopeAspect.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/aspectj/DataSourceAspect.class b/sync-framework/target/classes/com/lyr/framework/aspectj/DataSourceAspect.class index cedd3b8..547a090 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/aspectj/DataSourceAspect.class and b/sync-framework/target/classes/com/lyr/framework/aspectj/DataSourceAspect.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/aspectj/LogAspect.class b/sync-framework/target/classes/com/lyr/framework/aspectj/LogAspect.class index aa5bf7c..de50ee2 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/aspectj/LogAspect.class and b/sync-framework/target/classes/com/lyr/framework/aspectj/LogAspect.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/aspectj/RateLimiterAspect.class b/sync-framework/target/classes/com/lyr/framework/aspectj/RateLimiterAspect.class index 255cbba..3e4892b 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/aspectj/RateLimiterAspect.class and b/sync-framework/target/classes/com/lyr/framework/aspectj/RateLimiterAspect.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/config/ApplicationConfig.class b/sync-framework/target/classes/com/lyr/framework/config/ApplicationConfig.class index 1298ee5..bc4996e 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/config/ApplicationConfig.class and b/sync-framework/target/classes/com/lyr/framework/config/ApplicationConfig.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/config/DruidConfig$1.class b/sync-framework/target/classes/com/lyr/framework/config/DruidConfig$1.class index d55f4e9..9bd3b40 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/config/DruidConfig$1.class and b/sync-framework/target/classes/com/lyr/framework/config/DruidConfig$1.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/config/DruidConfig.class b/sync-framework/target/classes/com/lyr/framework/config/DruidConfig.class index fed0116..9829d09 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/config/DruidConfig.class and b/sync-framework/target/classes/com/lyr/framework/config/DruidConfig.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/config/FastJson2JsonRedisSerializer.class b/sync-framework/target/classes/com/lyr/framework/config/FastJson2JsonRedisSerializer.class index e7ec73d..38727cf 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/config/FastJson2JsonRedisSerializer.class and b/sync-framework/target/classes/com/lyr/framework/config/FastJson2JsonRedisSerializer.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/config/I18nConfig.class b/sync-framework/target/classes/com/lyr/framework/config/I18nConfig.class index d94f82c..6edce19 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/config/I18nConfig.class and b/sync-framework/target/classes/com/lyr/framework/config/I18nConfig.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/config/RedisConfig.class b/sync-framework/target/classes/com/lyr/framework/config/RedisConfig.class index 30c737f..7784344 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/config/RedisConfig.class and b/sync-framework/target/classes/com/lyr/framework/config/RedisConfig.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/config/ResourcesConfig.class b/sync-framework/target/classes/com/lyr/framework/config/ResourcesConfig.class index b2ece83..e823934 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/config/ResourcesConfig.class and b/sync-framework/target/classes/com/lyr/framework/config/ResourcesConfig.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/config/SecurityConfig.class b/sync-framework/target/classes/com/lyr/framework/config/SecurityConfig.class index 130c787..798e01e 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/config/SecurityConfig.class and b/sync-framework/target/classes/com/lyr/framework/config/SecurityConfig.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/config/ServerConfig.class b/sync-framework/target/classes/com/lyr/framework/config/ServerConfig.class index 4003e5e..9978a4f 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/config/ServerConfig.class and b/sync-framework/target/classes/com/lyr/framework/config/ServerConfig.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/config/ThreadPoolConfig$1.class b/sync-framework/target/classes/com/lyr/framework/config/ThreadPoolConfig$1.class index e72b475..224c5af 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/config/ThreadPoolConfig$1.class and b/sync-framework/target/classes/com/lyr/framework/config/ThreadPoolConfig$1.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/config/properties/DruidProperties.class b/sync-framework/target/classes/com/lyr/framework/config/properties/DruidProperties.class index dc37b48..f12b12d 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/config/properties/DruidProperties.class and b/sync-framework/target/classes/com/lyr/framework/config/properties/DruidProperties.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/config/properties/PermitAllUrlProperties.class b/sync-framework/target/classes/com/lyr/framework/config/properties/PermitAllUrlProperties.class index 97e0457..c336431 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/config/properties/PermitAllUrlProperties.class and b/sync-framework/target/classes/com/lyr/framework/config/properties/PermitAllUrlProperties.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/datasource/DynamicDataSource.class b/sync-framework/target/classes/com/lyr/framework/datasource/DynamicDataSource.class index 5261157..d0e3f5d 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/datasource/DynamicDataSource.class and b/sync-framework/target/classes/com/lyr/framework/datasource/DynamicDataSource.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/datasource/DynamicDataSourceContextHolder.class b/sync-framework/target/classes/com/lyr/framework/datasource/DynamicDataSourceContextHolder.class index f9e9b22..d9baf62 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/datasource/DynamicDataSourceContextHolder.class and b/sync-framework/target/classes/com/lyr/framework/datasource/DynamicDataSourceContextHolder.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/interceptor/RepeatSubmitInterceptor.class b/sync-framework/target/classes/com/lyr/framework/interceptor/RepeatSubmitInterceptor.class index 90f4994..bad77f5 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/interceptor/RepeatSubmitInterceptor.class and b/sync-framework/target/classes/com/lyr/framework/interceptor/RepeatSubmitInterceptor.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/interceptor/impl/SameUrlDataInterceptor.class b/sync-framework/target/classes/com/lyr/framework/interceptor/impl/SameUrlDataInterceptor.class index e983874..b638f47 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/interceptor/impl/SameUrlDataInterceptor.class and b/sync-framework/target/classes/com/lyr/framework/interceptor/impl/SameUrlDataInterceptor.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/manager/AsyncManager.class b/sync-framework/target/classes/com/lyr/framework/manager/AsyncManager.class index 3948180..8ba0066 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/manager/AsyncManager.class and b/sync-framework/target/classes/com/lyr/framework/manager/AsyncManager.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/manager/factory/AsyncFactory$1.class b/sync-framework/target/classes/com/lyr/framework/manager/factory/AsyncFactory$1.class index f9e30c1..07eb2eb 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/manager/factory/AsyncFactory$1.class and b/sync-framework/target/classes/com/lyr/framework/manager/factory/AsyncFactory$1.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/manager/factory/AsyncFactory$2.class b/sync-framework/target/classes/com/lyr/framework/manager/factory/AsyncFactory$2.class index 6deff0d..9a1c7b6 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/manager/factory/AsyncFactory$2.class and b/sync-framework/target/classes/com/lyr/framework/manager/factory/AsyncFactory$2.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/manager/factory/AsyncFactory.class b/sync-framework/target/classes/com/lyr/framework/manager/factory/AsyncFactory.class index 22013c3..bc976b4 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/manager/factory/AsyncFactory.class and b/sync-framework/target/classes/com/lyr/framework/manager/factory/AsyncFactory.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/security/context/AuthenticationContextHolder.class b/sync-framework/target/classes/com/lyr/framework/security/context/AuthenticationContextHolder.class index 771117f..776c62a 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/security/context/AuthenticationContextHolder.class and b/sync-framework/target/classes/com/lyr/framework/security/context/AuthenticationContextHolder.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/security/context/PermissionContextHolder.class b/sync-framework/target/classes/com/lyr/framework/security/context/PermissionContextHolder.class index e839c7e..f72d0a6 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/security/context/PermissionContextHolder.class and b/sync-framework/target/classes/com/lyr/framework/security/context/PermissionContextHolder.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/security/filter/JwtAuthenticationTokenFilter.class b/sync-framework/target/classes/com/lyr/framework/security/filter/JwtAuthenticationTokenFilter.class index 3f4cda0..605b33c 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/security/filter/JwtAuthenticationTokenFilter.class and b/sync-framework/target/classes/com/lyr/framework/security/filter/JwtAuthenticationTokenFilter.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/security/handle/AuthenticationEntryPointImpl.class b/sync-framework/target/classes/com/lyr/framework/security/handle/AuthenticationEntryPointImpl.class index 6200432..fa4aff2 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/security/handle/AuthenticationEntryPointImpl.class and b/sync-framework/target/classes/com/lyr/framework/security/handle/AuthenticationEntryPointImpl.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/security/handle/LogoutSuccessHandlerImpl.class b/sync-framework/target/classes/com/lyr/framework/security/handle/LogoutSuccessHandlerImpl.class index e06e7ab..b2ff544 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/security/handle/LogoutSuccessHandlerImpl.class and b/sync-framework/target/classes/com/lyr/framework/security/handle/LogoutSuccessHandlerImpl.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/web/domain/Server.class b/sync-framework/target/classes/com/lyr/framework/web/domain/Server.class index 1a58d07..3fe0a84 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/web/domain/Server.class and b/sync-framework/target/classes/com/lyr/framework/web/domain/Server.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/web/domain/server/Cpu.class b/sync-framework/target/classes/com/lyr/framework/web/domain/server/Cpu.class index 435da47..2d1d28f 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/web/domain/server/Cpu.class and b/sync-framework/target/classes/com/lyr/framework/web/domain/server/Cpu.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/web/domain/server/Jvm.class b/sync-framework/target/classes/com/lyr/framework/web/domain/server/Jvm.class index 0c09d68..30f4c8a 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/web/domain/server/Jvm.class and b/sync-framework/target/classes/com/lyr/framework/web/domain/server/Jvm.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/web/domain/server/Mem.class b/sync-framework/target/classes/com/lyr/framework/web/domain/server/Mem.class index 9bb2181..993a415 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/web/domain/server/Mem.class and b/sync-framework/target/classes/com/lyr/framework/web/domain/server/Mem.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/web/domain/server/Sys.class b/sync-framework/target/classes/com/lyr/framework/web/domain/server/Sys.class index 2bb7775..df8a52b 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/web/domain/server/Sys.class and b/sync-framework/target/classes/com/lyr/framework/web/domain/server/Sys.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/web/domain/server/SysFile.class b/sync-framework/target/classes/com/lyr/framework/web/domain/server/SysFile.class index 53cd832..5895f07 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/web/domain/server/SysFile.class and b/sync-framework/target/classes/com/lyr/framework/web/domain/server/SysFile.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/web/exception/GlobalExceptionHandler.class b/sync-framework/target/classes/com/lyr/framework/web/exception/GlobalExceptionHandler.class index e2ed7cd..aba656e 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/web/exception/GlobalExceptionHandler.class and b/sync-framework/target/classes/com/lyr/framework/web/exception/GlobalExceptionHandler.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/web/service/PermissionService.class b/sync-framework/target/classes/com/lyr/framework/web/service/PermissionService.class index 7834781..24170c8 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/web/service/PermissionService.class and b/sync-framework/target/classes/com/lyr/framework/web/service/PermissionService.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/web/service/SysLoginService.class b/sync-framework/target/classes/com/lyr/framework/web/service/SysLoginService.class index 0a96c98..1bfd378 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/web/service/SysLoginService.class and b/sync-framework/target/classes/com/lyr/framework/web/service/SysLoginService.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/web/service/SysPasswordService.class b/sync-framework/target/classes/com/lyr/framework/web/service/SysPasswordService.class index 33a15cc..d570983 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/web/service/SysPasswordService.class and b/sync-framework/target/classes/com/lyr/framework/web/service/SysPasswordService.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/web/service/SysPermissionService.class b/sync-framework/target/classes/com/lyr/framework/web/service/SysPermissionService.class index 9f5a1d5..1030024 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/web/service/SysPermissionService.class and b/sync-framework/target/classes/com/lyr/framework/web/service/SysPermissionService.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/web/service/SysRegisterService.class b/sync-framework/target/classes/com/lyr/framework/web/service/SysRegisterService.class index 6243832..f99d747 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/web/service/SysRegisterService.class and b/sync-framework/target/classes/com/lyr/framework/web/service/SysRegisterService.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/web/service/TokenService.class b/sync-framework/target/classes/com/lyr/framework/web/service/TokenService.class index 75c1f9e..4083775 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/web/service/TokenService.class and b/sync-framework/target/classes/com/lyr/framework/web/service/TokenService.class differ diff --git a/sync-framework/target/classes/com/lyr/framework/web/service/UserDetailsServiceImpl.class b/sync-framework/target/classes/com/lyr/framework/web/service/UserDetailsServiceImpl.class index 0aa7952..b028649 100644 Binary files a/sync-framework/target/classes/com/lyr/framework/web/service/UserDetailsServiceImpl.class and b/sync-framework/target/classes/com/lyr/framework/web/service/UserDetailsServiceImpl.class differ diff --git a/sync-gather/src/main/java/com/lyr/gather/controller/DataSourceConfigController.java b/sync-gather/src/main/java/com/lyr/gather/controller/DataSourceConfigController.java index 0ba0eb6..4f7fd98 100644 --- a/sync-gather/src/main/java/com/lyr/gather/controller/DataSourceConfigController.java +++ b/sync-gather/src/main/java/com/lyr/gather/controller/DataSourceConfigController.java @@ -1,17 +1,21 @@ package com.lyr.gather.controller; import com.lyr.gather.service.DataSourceConfigService; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import javax.validation.constraints.NotNull; /** * @author liyc * @date 2024/10/30 * @description TODO **/ +@Validated @RestController @RequestMapping("/gather") public class DataSourceConfigController { @@ -31,4 +35,10 @@ public class DataSourceConfigController { public void add() { dataSourceConfigService.add(); } + + + @GetMapping("/list/{dataSource}") + public void list(@NotNull(message = "数据源名称不能为空") @PathVariable("dataSource") String datasourceName) { + dataSourceConfigService.list(datasourceName, null); + } } diff --git a/sync-gather/src/main/java/com/lyr/gather/domain/vo/DataSourceConfig.java b/sync-gather/src/main/java/com/lyr/gather/domain/model/DataSourceConfig.java similarity index 97% rename from sync-gather/src/main/java/com/lyr/gather/domain/vo/DataSourceConfig.java rename to sync-gather/src/main/java/com/lyr/gather/domain/model/DataSourceConfig.java index c07c4fd..a6fa5cc 100644 --- a/sync-gather/src/main/java/com/lyr/gather/domain/vo/DataSourceConfig.java +++ b/sync-gather/src/main/java/com/lyr/gather/domain/model/DataSourceConfig.java @@ -1,4 +1,4 @@ -package com.lyr.gather.domain.vo; +package com.lyr.gather.domain.model; import com.lyr.common.annotation.Excel; import lombok.Data; diff --git a/sync-gather/src/main/java/com/lyr/gather/domain/model/TSupplier.java b/sync-gather/src/main/java/com/lyr/gather/domain/model/TSupplier.java new file mode 100644 index 0000000..fe80543 --- /dev/null +++ b/sync-gather/src/main/java/com/lyr/gather/domain/model/TSupplier.java @@ -0,0 +1,108 @@ +package com.lyr.gather.domain.model; + + +import lombok.Data; +import lombok.experimental.Accessors; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import java.util.Date; + +@Data +@Accessors(chain = true) +public class TSupplier { + + private Integer fItemId; + private String fAddress; + private String fCity; + private String fProvince; + private String fCountry; + private String fPostalCode; + private String fPhone; + private String fFax; + private String fEmail; + private String fHomePage; + private String fCreditLimit; + private String fTaxId; + private String fBank; + private String fAccount; + private String fBrNo; + private Integer fBoundAttr; + private Integer fErpClsId; + private String fShortName; + private Integer fPriorityId; + private Integer fPGroupId; + private Integer fStatus; + private Integer fLanguageId; + private Integer fRegionId; + private Integer fTrade; + private Double fMinPoValue; + private Double fMaxDebitDate; + private String fLegalPerson; + private String fContact; + private String fContactAcct; + private String fPhoneAcct; + private String fFaxAcct; + private String fZipAcct; + private String fEmailAcct; + private String fAddrAcct; + private Float fTax; + private Integer fCyId; + private Integer fSetId; + private Integer fSetDLineId; + private String fTaxNum; + private Integer fPriceClsId; + private Integer fOperId; + private String fCiqNumber; + private Short fDeleted; + private Short fSaleMode; + private String fName; + private String fNumber; + private Integer fParentId; + private String fShortNumber; + private Integer fArAccountId; + private Integer fApAccountId; + private Integer fPreAcctId; + private BigDecimal fLastTradeAmount; + private BigDecimal fLastRPAmount; + private String fFavorPolicy; + private Integer fDepartment; + private Integer fEmployee; + private String fCorperate; + private Date fBeginTradeDate; + private Date fEndTradeDate; + private Date fLastTradeDate; + private Date fLastReceiveDate; + private String fCashDiscount; + private Integer fCurrencyId; + private Double fMaxDealAmount; + private Double fMinForeReceiveRate; + private Double fMinReserveRate; + private Double fMaxForePayAmount; + private Double fMaxForePayRate; + private Integer fDebtLevel; + private Integer fCreditDays; + private BigDecimal fValueAddRate; + private Integer fPayTaxAcctId; + private BigDecimal fDiscount; + private Integer fTypeId; + private BigDecimal fCreditAmount; + private String fCreditLevel; + private Integer fStockIdAssignee; + private Integer fBr; + private String fRegmark; + private Boolean fLicAndPermit; + private String fLicence; + private Date fPaperPeriod; + private Integer fAlarmPeriod; + private Integer fOtherArAcctId; + private Integer fOtherApAcctId; + private Integer fPreArAcctId; + private String fHelpCode; + private Timestamp fModifyTime; + private Integer fCreditDegree; + private String fRightUserId; + private Integer fPaymentTime; + private String fSMSPhoneNumber; + private String fFullName; +} diff --git a/sync-gather/src/main/java/com/lyr/gather/mapper/DataSourceConfigMapper.java b/sync-gather/src/main/java/com/lyr/gather/mapper/DataSourceConfigMapper.java index 2a3f286..4e60007 100644 --- a/sync-gather/src/main/java/com/lyr/gather/mapper/DataSourceConfigMapper.java +++ b/sync-gather/src/main/java/com/lyr/gather/mapper/DataSourceConfigMapper.java @@ -1,7 +1,9 @@ package com.lyr.gather.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.lyr.gather.domain.vo.DataSourceConfig; +import com.lyr.gather.domain.model.DataSourceConfig; public interface DataSourceConfigMapper extends BaseMapper { + + } diff --git a/sync-gather/src/main/java/com/lyr/gather/mapper/TSupplierMapper.java b/sync-gather/src/main/java/com/lyr/gather/mapper/TSupplierMapper.java new file mode 100644 index 0000000..500d42b --- /dev/null +++ b/sync-gather/src/main/java/com/lyr/gather/mapper/TSupplierMapper.java @@ -0,0 +1,25 @@ +package com.lyr.gather.mapper; + +import com.lyr.common.annotation.DataSource; +import com.lyr.gather.domain.model.TSupplier; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +public interface TSupplierMapper { + + @DataSource(name = "#dataSource") + @Select("SELECT " + // + "s.FItemID, " + // + "s.FSaleMode, " + // + "s.FName, " + // + "s.FNumber, " + // + "s.FParentID, " + // + "s.FShortNumber, " + // + "s.FHelpCode, " + // + "s.FFullName " + // + "FROM t_Supplier s") + List list(@Param("dataSource") String dataSource); + +} diff --git a/sync-gather/src/main/java/com/lyr/gather/service/DataSourceConfigService.java b/sync-gather/src/main/java/com/lyr/gather/service/DataSourceConfigService.java index 1e48d39..3509b4a 100644 --- a/sync-gather/src/main/java/com/lyr/gather/service/DataSourceConfigService.java +++ b/sync-gather/src/main/java/com/lyr/gather/service/DataSourceConfigService.java @@ -1,11 +1,13 @@ package com.lyr.gather.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.lyr.gather.domain.vo.DataSourceConfig; +import com.lyr.gather.domain.model.DataSourceConfig; public interface DataSourceConfigService extends IService { void print(); void add(); + + void list(String s, Object o); } diff --git a/sync-gather/src/main/java/com/lyr/gather/service/impl/DataSourceConfigServiceImpl.java b/sync-gather/src/main/java/com/lyr/gather/service/impl/DataSourceConfigServiceImpl.java index e9cc276..5dab190 100644 --- a/sync-gather/src/main/java/com/lyr/gather/service/impl/DataSourceConfigServiceImpl.java +++ b/sync-gather/src/main/java/com/lyr/gather/service/impl/DataSourceConfigServiceImpl.java @@ -2,9 +2,10 @@ package com.lyr.gather.service.impl; import com.alibaba.druid.pool.DruidDataSource; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.lyr.framework.manager.DataSourceManagerService; -import com.lyr.gather.domain.vo.DataSourceConfig; +import com.lyr.framework.manager.DataSourceManager; +import com.lyr.gather.domain.model.DataSourceConfig; import com.lyr.gather.mapper.DataSourceConfigMapper; +import com.lyr.gather.mapper.TSupplierMapper; import com.lyr.gather.service.DataSourceConfigService; import org.springframework.stereotype.Service; @@ -16,7 +17,10 @@ import java.util.List; public class DataSourceConfigServiceImpl extends ServiceImpl implements DataSourceConfigService { @Resource - private DataSourceManagerService dataSourceManagerService; + private DataSourceManager dataSourceManager; + @Resource + private TSupplierMapper tSupplierMapper; + @PostConstruct private void registered() { @@ -27,22 +31,29 @@ public class DataSourceConfigServiceImpl extends ServiceImpl