|
|
@ -1,5 +1,6 @@
|
|
|
|
package com.glxp.api.service.sync;
|
|
|
|
package com.glxp.api.service.sync;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.thread.ThreadUtil;
|
|
|
|
import com.glxp.api.constant.SocketMsgType;
|
|
|
|
import com.glxp.api.constant.SocketMsgType;
|
|
|
|
import com.glxp.api.dao.system.SyncDataSetDao;
|
|
|
|
import com.glxp.api.dao.system.SyncDataSetDao;
|
|
|
|
import com.glxp.api.entity.system.SyncDataSetEntity;
|
|
|
|
import com.glxp.api.entity.system.SyncDataSetEntity;
|
|
|
@ -30,7 +31,7 @@ public class WebSocketComponent implements CommandLineRunner {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void run(String... args) throws Exception {
|
|
|
|
public void run(String... args) throws Exception {
|
|
|
|
|
|
|
|
ThreadUtil.execAsync(() -> {
|
|
|
|
SyncDataSetEntity syncDataSetEntity = syncDataSetDao.selectSet();
|
|
|
|
SyncDataSetEntity syncDataSetEntity = syncDataSetDao.selectSet();
|
|
|
|
String ip = syncDataSetEntity.getSyncIp();
|
|
|
|
String ip = syncDataSetEntity.getSyncIp();
|
|
|
|
ip = ip.replace("http://", "");
|
|
|
|
ip = ip.replace("http://", "");
|
|
|
@ -67,6 +68,8 @@ public class WebSocketComponent implements CommandLineRunner {
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|