|
|
@@ -7,6 +7,7 @@ import com.telpo.dipperposition.co.RzlAccount; |
|
|
|
import com.telpo.dipperposition.config.PositionConfig; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
@@ -27,8 +28,9 @@ import com.alibaba.nacos.api.config.listener.Listener; |
|
|
|
@RestController |
|
|
|
@Slf4j |
|
|
|
public class DipperPositionController { |
|
|
|
|
|
|
|
RzlAccount rzlAccount; |
|
|
|
@Value(value = "${position.hello}") |
|
|
|
private String hello; |
|
|
|
//RzlAccount rzlAccount; |
|
|
|
|
|
|
|
@RequestMapping("/getPos") |
|
|
|
public String getPos() throws NacosException, InterruptedException, IOException { |
|
|
@@ -44,8 +46,7 @@ public class DipperPositionController { |
|
|
|
// //log.info(positionId + ":" + content.positionId) |
|
|
|
// Map<String, Object> dataMap = NacosDataParserHandler.getInstance().parseNacosData(content,"yaml"); |
|
|
|
// return dataMap == null ? "" : (String)dataMap.get(positionId); |
|
|
|
String returnStr= |
|
|
|
"return position = " + PositionConfig.getInstance().getHello() + "return name = " + PositionConfig.getInstance().getName(); |
|
|
|
String returnStr= "return position = " + hello; |
|
|
|
|
|
|
|
return returnStr; |
|
|
|
//return "Helle world!"; //ContextLoader.getCurrentWebApplicationContext().toString(); |
|
|
|