本文整理了Java中io.vertx.ext.web.Router.getRoutes
方法的一些代码示例,展示了Router.getRoutes
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Router.getRoutes
方法的具体详情如下:
包路径:io.vertx.ext.web.Router
类名称:Router
方法名:getRoutes
暂无
代码示例来源:origin: org.zalando/vertx-swagger
@Override
public List<Route> getRoutes() {
return router.getRoutes();
}
代码示例来源:origin: wang007/vertx-start
@Override
public List<io.vertx.ext.web.Route> getRoutes() {
return delegate.getRoutes();
}
代码示例来源:origin: vert-x3/vertx-web
@Test
public void testGetRoutes() throws Exception {
router.route("/abc").handler(rc -> {
});
router.route("/abc/def").handler(rc -> {
});
router.route("/xyz").handler(rc -> {
});
List<Route> routes = router.getRoutes();
assertEquals(3, routes.size());
}
代码示例来源:origin: vert-x3/vertx-rx
/**
* @return a list of all the routes on this router
*/
public List<io.vertx.rxjava.ext.web.Route> getRoutes() {
List<io.vertx.rxjava.ext.web.Route> ret = delegate.getRoutes().stream().map(elt -> io.vertx.rxjava.ext.web.Route.newInstance(elt)).collect(java.util.stream.Collectors.toList());
return ret;
}
代码示例来源:origin: io.vertx/vertx-rx-java
/**
* @return a list of all the routes on this router
*/
public List<io.vertx.rxjava.ext.web.Route> getRoutes() {
List<io.vertx.rxjava.ext.web.Route> ret = delegate.getRoutes().stream().map(elt -> io.vertx.rxjava.ext.web.Route.newInstance(elt)).collect(java.util.stream.Collectors.toList());
return ret;
}
代码示例来源:origin: wang007/vertx-start
private static void pathLog(Router mainRouter, Map<String, Router> subRouters) {
StringBuilder log = new StringBuilder(2048).append("\r\n");
log.append("------------ Main-Router all path ----------------").append("\r\n");
mainRouter.getRoutes().forEach(route -> {
String path = route.getPath();
if(!subRouters.containsKey(path)) {
log.append(path).append("\r\n");
}
});
log.append("\r\n");
subRouters.forEach((mountPath, subRouter) -> {
log.append("---------- Sub-Router:"+ mountPath +". all path-----------").append("\r\n");
subRouter.getRoutes().forEach(route -> {
String path = route.getPath();
log.append(mountPath).append(path).append("\r\n");
});
log.append("\r\n");
});
logger.info(log.toString());
}
代码示例来源:origin: cn.vertxup/vertx-up
LOGGER.info(Info.HTTP_SERVERS, this.getClass().getSimpleName(), this.deploymentID(),
portLiteral);
final List<Route> routes = router.getRoutes();
final Map<String, Set<Route>> routeMap = new TreeMap<>();
代码示例来源:origin: silentbalanceyh/vertx-zero
LOGGER.info(Info.HTTP_SERVERS, this.getClass().getSimpleName(), this.deploymentID(),
portLiteral);
final List<Route> routes = router.getRoutes();
final Map<String, Set<Route>> routeMap = new TreeMap<>();
代码示例来源:origin: io.vertx/vertx-web
@Test
public void testGetRoutes() throws Exception {
router.route("/abc").handler(rc -> {
});
router.route("/abc/def").handler(rc -> {
});
router.route("/xyz").handler(rc -> {
});
List<Route> routes = router.getRoutes();
assertEquals(3, routes.size());
}
内容来源于网络,如有侵权,请联系作者删除!