org.restlet.routing.Router.setDefaultMatchingQuery()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(209)

本文整理了Java中org.restlet.routing.Router.setDefaultMatchingQuery方法的一些代码示例,展示了Router.setDefaultMatchingQuery的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Router.setDefaultMatchingQuery方法的具体详情如下:
包路径:org.restlet.routing.Router
类名称:Router
方法名:setDefaultMatchingQuery

Router.setDefaultMatchingQuery介绍

[英]Sets the default setting for whether the routing should be done on URIs with or without taking into account query string. By default, it is set to false.
[中]设置是否应在考虑查询字符串的情况下在URI上执行路由的默认设置。默认情况下,它设置为false。

代码示例

代码示例来源:origin: bioinformatics-ua/dicoogle

/**
 * Creates a root Restlet that will receive all incoming calls.
 * @return a Restlet for the root 
 */
@Override
public synchronized Restlet createInboundRoot() {
  // Create a router Restlet that routes each call to a
  // new instance of our resources
  this.internalRouter = new Router(getContext());
  // Defines routing to resources
  this.internalRouter.setDefaultMatchingQuery(false);
  
  //lets add plugin registred services
  //this is still a little brittle... :(
  for(ServerResource resource : pluginServices) {
    LoggerFactory.getLogger(PluginRestletApplication.class).debug("Inbound: {}", resource);
    internalRouter.attach("/" + resource.toString(), resource.getClass());
  }
  
  LoggerFactory.getLogger(PluginRestletApplication.class).debug("Installed plugin restlets: {}",
      pluginServices);
  return internalRouter;
}

代码示例来源:origin: bioinformatics-ua/dicoogle

this.internalRouter.setDefaultMatchingQuery(false);

代码示例来源:origin: org.restlet.osgi/org.restlet

router.setDefaultMatchingQuery(getBoolean(item, getComponent()
    .getInternalRouter().getDefaultMatchingQuery()));

相关文章