From 1b21d2d04cd02fc803ee6af7e45cc615a1de3a0e Mon Sep 17 00:00:00 2001 From: linwl <304115325@qq.com> Date: Tue, 19 Jan 2021 12:17:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=B0docker=E5=A4=96?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DipperAstPosAsyncTaskServiceImpl.java | 8 ++++---- .../service/impl/DipperAstTimeAsyncTaskServiceImpl.java | 1 - .../service/impl/DipperDataAsyncTaskServiceImpl.java | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/telpo/dipperposition/service/impl/DipperAstPosAsyncTaskServiceImpl.java b/src/main/java/com/telpo/dipperposition/service/impl/DipperAstPosAsyncTaskServiceImpl.java index d6bd996..fe3f30e 100644 --- a/src/main/java/com/telpo/dipperposition/service/impl/DipperAstPosAsyncTaskServiceImpl.java +++ b/src/main/java/com/telpo/dipperposition/service/impl/DipperAstPosAsyncTaskServiceImpl.java @@ -52,14 +52,14 @@ public class DipperAstPosAsyncTaskServiceImpl implements IDipperAstPosAsyncTaskS // 不存在说明token是已过期了 String centerProvinceName = ""; String centerProvinceLonAndAlt = ""; - String appResPath = ""; + String appCsvPath = ""; try { - appResPath = ResourceUtils.getURL("resources:").getPath(); - log.debug(appResPath); + appCsvPath = ResourceUtils.getFile("resources"+this.centerProvinceFilePath).getPath(); + log.debug(appCsvPath); } catch (Exception e) { log.debug("cannot find path"); } - List centerAddressSets = CSVUtil.readCSV(appResPath + this.centerProvinceFilePath); + List centerAddressSets = CSVUtil.readCSV(appCsvPath); for (String centerAddressSet:centerAddressSets) { String[] centerAddressSetArray = centerAddressSet.split(","); if (centerAddressSetArray.length < 3) { diff --git a/src/main/java/com/telpo/dipperposition/service/impl/DipperAstTimeAsyncTaskServiceImpl.java b/src/main/java/com/telpo/dipperposition/service/impl/DipperAstTimeAsyncTaskServiceImpl.java index bcf9583..734aefd 100644 --- a/src/main/java/com/telpo/dipperposition/service/impl/DipperAstTimeAsyncTaskServiceImpl.java +++ b/src/main/java/com/telpo/dipperposition/service/impl/DipperAstTimeAsyncTaskServiceImpl.java @@ -23,7 +23,6 @@ import java.time.LocalDateTime; public class DipperAstTimeAsyncTaskServiceImpl implements IDipperAstTimeAsyncTaskService { @Override - @Async("asyncServiceExecutor") public String pushAstTime() { // 创建Socket客户端实例; diff --git a/src/main/java/com/telpo/dipperposition/service/impl/DipperDataAsyncTaskServiceImpl.java b/src/main/java/com/telpo/dipperposition/service/impl/DipperDataAsyncTaskServiceImpl.java index dee9a3e..dacfb40 100644 --- a/src/main/java/com/telpo/dipperposition/service/impl/DipperDataAsyncTaskServiceImpl.java +++ b/src/main/java/com/telpo/dipperposition/service/impl/DipperDataAsyncTaskServiceImpl.java @@ -32,6 +32,7 @@ public class DipperDataAsyncTaskServiceImpl implements IDipperDataAsyncTaskServi @Override + @Async("asyncServiceExecutor") public void pullAstEPH() { // (1) 发送bds获取星历数据 String dipperData = pullEPHFromDipper(); @@ -46,7 +47,6 @@ public class DipperDataAsyncTaskServiceImpl implements IDipperDataAsyncTaskServi } } - private String pullEPHFromDipper() { // 创建Socket客户端实例; @@ -64,7 +64,6 @@ public class DipperDataAsyncTaskServiceImpl implements IDipperDataAsyncTaskServi } @Override - @Async("asyncServiceExecutor") public String getAstEPH(){ return (String)redisUtil.get(DIPPER_DATA_KEY); }