|
|
@@ -4,6 +4,7 @@ import com.alibaba.cloud.nacos.parser.NacosDataParserHandler; |
|
|
|
import com.alibaba.nacos.api.PropertyKeyConst; |
|
|
|
import com.alibaba.nacos.api.exception.NacosException; |
|
|
|
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.web.bind.annotation.RequestMapping; |
|
|
@@ -27,7 +28,8 @@ import com.alibaba.nacos.api.config.listener.Listener; |
|
|
|
@Slf4j |
|
|
|
public class DipperPositionController { |
|
|
|
|
|
|
|
@Autowired RzlAccount rzlAccount; |
|
|
|
@Autowired |
|
|
|
PositionConfig positionConfig; |
|
|
|
|
|
|
|
@RequestMapping("/getPos") |
|
|
|
public String getPos() throws NacosException, InterruptedException, IOException { |
|
|
@@ -44,7 +46,7 @@ public class DipperPositionController { |
|
|
|
// Map<String, Object> dataMap = NacosDataParserHandler.getInstance().parseNacosData(content,"yaml"); |
|
|
|
// return dataMap == null ? "" : (String)dataMap.get(positionId); |
|
|
|
|
|
|
|
return rzlAccount.getHello(); |
|
|
|
return positionConfig.getHello(); |
|
|
|
//return "Helle world!"; //ContextLoader.getCurrentWebApplicationContext().toString(); |
|
|
|
} |
|
|
|
} |