diff --git a/cloud-etl-client/pom.xml b/cloud-etl-client/pom.xml
index 01f1f37..450a77c 100644
--- a/cloud-etl-client/pom.xml
+++ b/cloud-etl-client/pom.xml
@@ -16,5 +16,30 @@
17
UTF-8
+
+
+
+ com.muyu
+ cloud-etl-common
+ 1.0.0
+ compile
+
+
+
+ com.muyu
+ cloud-common-etl
+ 1.0.0
+ compile
+
+
+
+ com.muyu
+ cloud-etl-remote
+ 1.0.0
+ compile
+
+
+
+
diff --git a/cloud-etl-server/src/main/java/com/muyu/cloud/etl/mysql/MySqlDataSource.java b/cloud-etl-client/src/main/java/com/muyu/mysql/MySqlDataSource.java
similarity index 98%
rename from cloud-etl-server/src/main/java/com/muyu/cloud/etl/mysql/MySqlDataSource.java
rename to cloud-etl-client/src/main/java/com/muyu/mysql/MySqlDataSource.java
index 162efb8..c2c0448 100644
--- a/cloud-etl-server/src/main/java/com/muyu/cloud/etl/mysql/MySqlDataSource.java
+++ b/cloud-etl-client/src/main/java/com/muyu/mysql/MySqlDataSource.java
@@ -1,8 +1,7 @@
-package com.muyu.cloud.etl.mysql;
+package com.muyu.mysql;
-import com.muyu.cloud.etl.service.SourceService;
-import com.muyu.common.core.utils.SpringUtils;
+import com.muyu.basic.SourceConfig;
import com.muyu.data.base.BaseDataAbsSource;
import com.muyu.domain.DataValue;
import com.muyu.domain.Source;
@@ -10,6 +9,7 @@ import com.muyu.domain.enums.DataType;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import lombok.extern.log4j.Log4j2;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.sql.*;
@@ -21,7 +21,9 @@ import java.util.concurrent.ConcurrentHashMap;
public class MySqlDataSource extends BaseDataAbsSource {
- SourceService sourceService = SpringUtils.getBean(SourceService.class);
+ @Autowired
+ private SourceConfig sourceRemote;
+// SourceService sourceService = SpringUtils.getBean(SourceService.class);
@Override
@@ -357,7 +359,7 @@ public class MySqlDataSource extends BaseDataAbsSource {
Long dataSourceId = query.getDataSourceId();
ConcurrentHashMap map = new ConcurrentHashMap<>();
- Source dataSources = sourceService.getById(dataSourceId);
+ Source dataSources = sourceRemote.queryById(dataSourceId);
HikariConfig hikariConfig = new HikariConfig();
hikariConfig.setPoolName("HikariCP 连接池");
diff --git a/cloud-etl-server/src/main/java/com/muyu/cloud/etl/mysql/MySqlQuery.java b/cloud-etl-client/src/main/java/com/muyu/mysql/MySqlQuery.java
similarity index 92%
rename from cloud-etl-server/src/main/java/com/muyu/cloud/etl/mysql/MySqlQuery.java
rename to cloud-etl-client/src/main/java/com/muyu/mysql/MySqlQuery.java
index 8bcb3bd..79d774a 100644
--- a/cloud-etl-server/src/main/java/com/muyu/cloud/etl/mysql/MySqlQuery.java
+++ b/cloud-etl-client/src/main/java/com/muyu/mysql/MySqlQuery.java
@@ -1,4 +1,4 @@
-package com.muyu.cloud.etl.mysql;
+package com.muyu.mysql;
import com.muyu.data.base.BaseQuery;
import lombok.AllArgsConstructor;