From dd1a7f488a2f1eba18c3c2073ff535f102a61088 Mon Sep 17 00:00:00 2001 From: linwl <304115325@qq.com> Date: Tue, 19 Jan 2021 08:32:45 +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 --- .../controller/DipperDataAsyncTaskController.java | 5 +++-- .../java/com/telpo/dipperposition/task/ScheduleService.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/telpo/dipperposition/controller/DipperDataAsyncTaskController.java b/src/main/java/com/telpo/dipperposition/controller/DipperDataAsyncTaskController.java index 786a9c8..7e674df 100644 --- a/src/main/java/com/telpo/dipperposition/controller/DipperDataAsyncTaskController.java +++ b/src/main/java/com/telpo/dipperposition/controller/DipperDataAsyncTaskController.java @@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController; @Slf4j public class DipperDataAsyncTaskController { @Value(value = "${position-server.serverAddr}") - private String hello; + private String serverAddr; //RzlAccount rzlAccount; @Autowired @@ -35,13 +35,14 @@ public class DipperDataAsyncTaskController { * 获取星历数据 */ public String getAstEPH() { + log.info("DipperDataAsyncTaskController serverAddr = " + serverAddr); return dipperDataAsyncTaskService.getAstEPH(); } @RequestMapping("/getPos") public String getPos() { - return "return serverAddr = " + hello; + return "return serverAddr = " + serverAddr; } } diff --git a/src/main/java/com/telpo/dipperposition/task/ScheduleService.java b/src/main/java/com/telpo/dipperposition/task/ScheduleService.java index 885a633..03e3315 100644 --- a/src/main/java/com/telpo/dipperposition/task/ScheduleService.java +++ b/src/main/java/com/telpo/dipperposition/task/ScheduleService.java @@ -1,5 +1,6 @@ package com.telpo.dipperposition.task; +import com.telpo.dipperposition.controller.DipperDataAsyncTaskController; import com.telpo.dipperposition.service.IDipperDataAsyncTaskService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -19,7 +20,7 @@ import org.springframework.stereotype.Component; public class ScheduleService { @Autowired - private IDipperDataAsyncTaskService dipperDataAsyncTaskService; + private DipperDataAsyncTaskController dipperDataAsyncTaskController; /* * 调用9012端口的接口获取星历数据。 @@ -32,7 +33,7 @@ public class ScheduleService { log.info("开始星历数据同步!"); // 获取推送失败的记录 try { - dipperDataAsyncTaskService.pullAstEPH(); + dipperDataAsyncTaskController.pullAstEPH(); } catch (Exception e) { log.error("执行定时获取星历数据发生异常:", e); }