Browse Source

修改到docker外运行环境

tags/v1.0.0^2
林万龙 4 years ago
parent
commit
dd1a7f488a
2 changed files with 6 additions and 4 deletions
  1. +3
    -2
      src/main/java/com/telpo/dipperposition/controller/DipperDataAsyncTaskController.java
  2. +3
    -2
      src/main/java/com/telpo/dipperposition/task/ScheduleService.java

+ 3
- 2
src/main/java/com/telpo/dipperposition/controller/DipperDataAsyncTaskController.java View File

@@ -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;
}

}

+ 3
- 2
src/main/java/com/telpo/dipperposition/task/ScheduleService.java View File

@@ -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);
}


Loading…
Cancel
Save