Commit c0459159 authored by 刘凡's avatar 刘凡

优化:【空工大】新建mass数据源时,提前查询是否已经新增过

parent c6de9800
...@@ -40,6 +40,10 @@ public class SocketConfig { ...@@ -40,6 +40,10 @@ public class SocketConfig {
@Value("${spring.datasource.password}") @Value("${spring.datasource.password}")
private String password; private String password;
@Value("${kgd.datasource.password.secretKey}")
private String passwordSecretKey;
@Value("${kgd.datasource.group_id}") @Value("${kgd.datasource.group_id}")
private String dataSourcesGroupId; private String dataSourcesGroupId;
...@@ -64,7 +68,7 @@ public class SocketConfig { ...@@ -64,7 +68,7 @@ public class SocketConfig {
clientSocket.setSoTimeout(10000); clientSocket.setSoTimeout(10000);
// 创建新线程处理连接 // 创建新线程处理连接
log.info("接收到客户端socket: {}", clientSocket.getRemoteSocketAddress()); log.info("接收到客户端socket: {}", clientSocket.getRemoteSocketAddress());
threadpool.execute(new ClientHandler(clientSocket, hostAndPort, url, username, password, dataSourcesGroupId)); threadpool.execute(new ClientHandler(clientSocket, hostAndPort, url, username, password, passwordSecretKey, dataSourcesGroupId));
} }
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
......
...@@ -70,4 +70,6 @@ spring.security.user.name=admin ...@@ -70,4 +70,6 @@ spring.security.user.name=admin
spring.security.user.password=a1234560 spring.security.user.password=a1234560
## \u7A7A\u5DE5\u5927\u6570\u636E\u6E90\u6240\u5C5E\u5206\u7C7BId ## \u7A7A\u5DE5\u5927\u6570\u636E\u6E90\u6240\u5C5E\u5206\u7C7BId
kgd.datasource.group_id=534de50c-bb8c-4450-87a0-557aac745a94 kgd.datasource.group_id=534de50c-bb8c-4450-87a0-557aac745a94
\ No newline at end of file ## ??????????????
kgd.datasource.password.secretKey=yeejoin,maas,password
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment