spark.Spark.get()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(426)

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

Spark.get介绍

[英]Map the route for HTTP GET requests
[中]映射HTTP GET请求的路由

代码示例

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    get("", this::index, engine);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", authenticationHelper::checkAdminUserAnd403);
    get("", this::index, engine);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", authenticationHelper::checkAdminUserAnd403);
    get("", this::index, engine);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", this::setContentType);
    get("", this::show);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", authenticationHelper::checkAdminUserOrGroupAdminUserAnd403);
    get("", this::index, engine);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", authenticationHelper::checkUserAnd403);
    get("", this::index, engine);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", authenticationHelper::checkAdminUserAnd403);
    get("", this::index, engine);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", authenticationHelper::checkAdminUserAnd403);
    get("", this::index, engine);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", authenticationHelper::checkAdminUserAnd403);
    get("", this::index, engine);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", authenticationHelper::checkAdminUserAnd403);
    get("", this::index, engine);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", authenticationHelper::checkAdminUserOrGroupAdminUserAnd403);
    get("", this::index, engine);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", authenticationHelper::checkUserAnd403);
    get("", this::index, engine);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", mimeType, this::setContentType);
    before("/*", mimeType, this::setContentType);
    before("", this::verifyContentType);
    before("/*", this::verifyContentType);
    get(Routes.PipelineSelection.PIPELINES_DATA, mimeType, this::pipelinesData);
    get("", mimeType, this::show);
    put("", mimeType, this::update);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", mimeType, this::setContentType);
    before("", this.mimeType, this.apiAuthenticationHelper::checkAdminUserAnd403);
    get("", this.mimeType, this::show);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerPath(), () -> {
    before("", mimeType, this::setContentType);
    before("", this::verifyContentType);
    before("", apiAuthenticationHelper::checkUserAnd403);
    get("", mimeType, this::index);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerPath(), () -> {
    before("", mimeType, this::setContentType);
    before("", this::verifyContentType);
    before("", apiAuthenticationHelper::checkUserAnd403);
    get("", mimeType, this::index);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(Routes.ServerHealthMessages.BASE, () -> {
    before("", this::setContentType);
    before("/*", this::setContentType);
    before("", apiAuthenticationHelper::checkUserAnd403);
    before("/*", apiAuthenticationHelper::checkUserAnd403);
    get("", this::show);
    head("", this::show);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", this::setContentType);
    before("/*", this::setContentType);
    before("", mimeType, apiAuthenticationHelper::checkPipelineGroupOperateUserAnd403);
    before("/*", mimeType, apiAuthenticationHelper::checkPipelineGroupOperateUserAnd403);
    get("", this::search);
    head("", this::search);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", this::setContentType);
    before("/*", this::setContentType);
    before("", mimeType, apiAuthenticationHelper::checkAdminUserOrGroupAdminUserAnd403);
    before("/*", mimeType, apiAuthenticationHelper::checkAdminUserOrGroupAdminUserAnd403);
    get(Routes.ElasticProfileAPI.ID + Routes.ElasticProfileAPI.USAGES, mimeType, this::usages);
    exception(RecordNotFoundException.class, this::notFound);
  });
}

代码示例来源:origin: gocd/gocd

@Override
public void setupRoutes() {
  path(controllerBasePath(), () -> {
    before("", mimeType, this::setContentType);
    before("/*", mimeType, this::setContentType);
    before("", this::verifyContentType);
    before("/*", this::verifyContentType);
    before(Export.PIPELINES_PATH, mimeType, apiAuthenticationHelper::checkPipelineGroupAdminUserAnd403);
    get(Export.PIPELINES_PATH, mimeType, this::exportPipeline);
    exception(RecordNotFoundException.class, this::notFound);
  });
}

相关文章