class RouterEndpoint {
    @Autowired
    private RouterResource routerResource;

    @RequestMapping(path = "/info", method = RequestMethod.GET)
    @ApiOperation(value = "获取本地节点信息", notes = "获取当前节点的简单信息", response = ResponseEntity.class, httpMethod = "GET")
    @ResponseBody
    public ResponseEntity<?> info() {
        return doInfo();
    }

    @RequestMapping(path = "/route/{routeServiceId}", method = RequestMethod.GET)
    @ApiOperation(value = "获取本地节点可访问其他节点的路由信息列表", notes = "", response = ResponseEntity.class, httpMethod = "GET")
    @ResponseBody
    public ResponseEntity<?> route(@PathVariable(value = "routeServiceId") @ApiParam(value = "目标服务名", required = true) String routeServiceId) {
        return doNativeRoute(routeServiceId);
    }

    @RequestMapping(path = "/route/{routeServiceId}/{routeProtocol}/{routeHost}/{routePort}/{routeContextPath}", method = RequestMethod.GET)
    @ApiOperation(value = "获取指定节点可访问其他节点的路由信息列表", notes = "", response = ResponseEntity.class, httpMethod = "GET")
    @ResponseBody
    public ResponseEntity<?> route(@PathVariable(value = "routeServiceId") @ApiParam(value = "目标服务名", required = true) String routeServiceId, @PathVariable(value = "routeProtocol") @ApiParam(value = "目标服务采用的协议。取值： http | https", defaultValue = "http", required = true) String routeProtocol, @PathVariable(value = "routeHost") @ApiParam(value = "目标服务所在机器的IP地址", required = true) String routeHost, @PathVariable(value = "routePort") @ApiParam(value = "目标服务所在机器的端口号", required = true) int routePort, @PathVariable(value = "routeContextPath") @ApiParam(value = "目标服务的调用路径前缀", defaultValue = "/", required = true) String routeContextPath) {
        return doRemoteRoute(routeServiceId, routeProtocol, routeHost, routePort, routeContextPath);
    }

    @RequestMapping(path = "/routes", method = RequestMethod.POST)
    @ApiOperation(value = "获取全路径的路由信息树", notes = "参数按调用服务名的前后次序排列，起始节点的服务名不能加上去。如果多个用“;”分隔，不允许出现空格", response = ResponseEntity.class, httpMethod = "POST")
    @ResponseBody
    public ResponseEntity<?> routes(@RequestBody @ApiParam(value = "格式示例：service-a;service-b", required = true) String routeServiceIds) {
        return doRoutes(routeServiceIds);
    }

    private ResponseEntity<?> doInfo() {
        try {
            RouterEntity routerEntity = routerResource.getRouterEntity();

            return ResponseUtil.getSuccessResponse(routerEntity);
        } catch (Exception e) {
            return ResponseUtil.getFailureResponse(e);
        }
    }

    private ResponseEntity<?> doNativeRoute(String routeServiceId) {<FILL_FUNCTION_BODY>}

    private ResponseEntity<?> doRemoteRoute(String routeServiceId, String routeProtocol, String routeHost, int routePort, String routeContextPath) {
        try {
            List<RouterEntity> routerEntityList = routerResource.getRouterEntityList(routeServiceId, routeProtocol, routeHost, routePort, routeContextPath);

            return ResponseUtil.getSuccessResponse(routerEntityList);
        } catch (Exception e) {
            return ResponseUtil.getFailureResponse(e);
        }
    }

    private ResponseEntity<?> doRoutes(String routeServiceIds) {
        try {
            RouterEntity routerEntity = routerResource.routeTree(routeServiceIds);

            return ResponseUtil.getSuccessResponse(routerEntity);
        } catch (Exception e) {
            return ResponseUtil.getFailureResponse(e);
        }
    }
}

        try {
            List<RouterEntity> routerEntityList = routerResource.getRouterEntityList(routeServiceId);

            return ResponseUtil.getSuccessResponse(routerEntityList);
        } catch (Exception e) {
            return ResponseUtil.getFailureResponse(e);
        }
    
<no_super_class>