Tabnine Logo
GetMapping
Code IndexAdd Tabnine to your IDE (free)

How to use
GetMapping
in
org.springframework.web.bind.annotation

Best Java code snippets using org.springframework.web.bind.annotation.GetMapping (Showing top 20 results out of 10,953)

Refine searchRefine arrow

  • PathVariable
  • ApiResponse
  • ApiResponses
  • ApiOperation
  • ApiParam
  • RequestParam
origin: hs-web/hsweb-framework

@GetMapping("/metas/{datasourceId}")
@Authorize(action = Permission.ACTION_QUERY, description = "获取元数据")
@ApiOperation("获取指定数据源的元数据")
public ResponseMessage<Map<ObjectMetadata.ObjectType, List<? extends ObjectMetadata>>> parseAllObject(
    @PathVariable
    @ApiParam("数据源ID") String datasourceId) throws Exception {
  DataSourceHolder.switcher().use(datasourceId);
  return ResponseMessage.ok(databaseManagerService.getMetas());
}
origin: com.hotels.road/road-paver-controllers

@ApiOperation(value = "Returns the details of a road")
@ApiResponses({
  @ApiResponse(code = 200, message = "Details of a road returned successfully.", response = StandardResponse.class),
  @ApiResponse(code = 400, message = "Invalid request or road name.", response = StandardResponse.class),
  @ApiResponse(code = 404, message = "Road not found.", response = StandardResponse.class) })
@GetMapping("/{name}")
public RoadModel getRoad(@ApiParam(name = "name", value = "road name", required = true) @PathVariable String name)
 throws UnknownRoadException {
 return service.getRoad(name);
}
origin: ctripcorp/apollo

@GetMapping("/envs/{env}/instances/by-namespace")
public PageDTO<InstanceDTO> getByNamespace(@PathVariable String env, @RequestParam String appId,
                      @RequestParam String clusterName, @RequestParam String namespaceName,
                      @RequestParam(required = false) String instanceAppId,
                      @RequestParam(defaultValue = "0") int page,
                      @RequestParam(defaultValue = "20") int size) {
  return instanceService.getByNamespace(Env.valueOf(env), appId, clusterName, namespaceName, instanceAppId, page, size);
}
origin: spring-projects/spring-framework

  @GetMapping("/bookings/{booking}")
  public Object getBooking(@PathVariable Long booking) {
    return "url";
  }
}
origin: ctripcorp/apollo

@GetMapping("/signin")
public String login(@RequestParam(value = "error", required = false) String error,
          @RequestParam(value = "logout", required = false) String logout) {
 return "login.html";
}
origin: spring-projects/spring-framework

  @GetMapping("/redirect")
  public String redirect() {
    return "redirect:/";
  }
}
origin: hs-web/hsweb-framework

@GetMapping("/me")
@Authorize
@ApiOperation("当前登录用户权限信息")
public ResponseMessage<Authentication> me(@ApiParam(hidden = true) Authentication authentication) {
  return ok(authentication);
}
origin: com.github.wnameless.spring/spring-routing-resolver

   .addAll(Arrays.asList(((RequestMapping) methodMapping).method()));
} else if (methodMapping.annotationType().equals(GetMapping.class)) {
 suffixPaths = ((GetMapping) methodMapping).value().length != 0
   ? newArrayList(
     ImmutableSet.copyOf(((GetMapping) methodMapping).value()))
   : newArrayList(
     ImmutableSet.copyOf(((GetMapping) methodMapping).path()));
origin: apache/servicecomb-java-chassis

 @Override
 public void process(Object annotation, OperationGenerator operationGenerator) {
  GetMapping mappingAnnotation = (GetMapping) annotation;
  Operation operation = operationGenerator.getOperation();

  // path/value是等同的
  this.processPath(mappingAnnotation.path(), operationGenerator);
  this.processPath(mappingAnnotation.value(), operationGenerator);
  this.processMethod(RequestMethod.GET, operationGenerator);
  this.processConsumes(mappingAnnotation.consumes(), operation);
  this.processProduces(mappingAnnotation.produces(), operation);

  if (StringUtils.isEmpty(operationGenerator.getHttpMethod())
    && StringUtils.isEmpty(operationGenerator.getSwaggerGenerator().getHttpMethod())) {
   throw new Error("HttpMethod must not both be empty in class and method");
  }
 }
}
origin: liupeng328/java-api-doc

if (StringUtil.isNotEmpty(getMapping.value())) {
  return getMapping.value()[0];
if (StringUtil.isNotEmpty(getMapping.name())) {
  return getMapping.name();
if (StringUtil.isNotEmpty(getMapping.path())) {
  return getMapping.path()[0];
origin: com.centit.framework/framework-core

private static void mapGetRequestInfo(JSONObject optMethod, Method method){
  GetMapping methodMapping = method.getAnnotation(GetMapping.class);
  optMethod.put("optName",method.getName());
  optMethod.put("optUrl",Pretreatment.mapTemplateString(
      StringBaseOpt.castObjectToString(methodMapping.value()),null,"*"));
  //GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE
  optMethod.put("optReq","R");
}
origin: de.adorsys.ledgers/ledgers-middleware-rest-api

@GetMapping("/{accountId}/balances")
@ApiOperation(value="Read balances", 
  notes="Returns balances of the deposit account with the given accountId. "
      + "User must have access to the target account. This is also accessible to other token types like tpp token (DELEGATED_ACESS)",
  authorizations =@Authorization(value="apiKey"))
@ApiResponses(value={
    @ApiResponse(code=200, response=AccountBalanceTO[].class, message="List of accounts balances for the given account.")
  })
ResponseEntity<List<AccountBalanceTO>> getBalances(
    @ApiParam(ACCOUNT_ID)
    @PathVariable(name="accountId") String accountId) throws NotFoundRestException, ForbiddenRestException;

origin: ctripcorp/apollo

@GetMapping("/envs/{env}/instances/by-release")
public PageDTO<InstanceDTO> getByRelease(@PathVariable String env, @RequestParam long releaseId,
                     @RequestParam(defaultValue = "0") int page,
                     @RequestParam(defaultValue = "20") int size) {
  return instanceService.getByRelease(Env.valueOf(env), releaseId, page, size);
}
origin: spring-projects/spring-framework

  @GetMapping("/bookings/{booking}")
  public String getBooking(@PathVariable Long booking) {
    return "url";
  }
}
origin: ctripcorp/apollo

@GetMapping("/favorites")
public List<Favorite> findFavorites(@RequestParam(value = "userId", required = false) String userId,
                  @RequestParam(value = "appId", required = false) String appId,
                  Pageable page) {
 return favoriteService.search(userId, appId, page);
}
origin: spring-projects/spring-framework

  @GetMapping("/test")
  public String handle() {
    return "It works!";
  }
}
origin: hs-web/hsweb-framework

@GetMapping({"/login-out", "/sign-out", "/exit"})
@Authorize
@ApiOperation("退出当前登录")
public ResponseMessage exit(@ApiParam(hidden = true) Authentication authentication) {
  eventPublisher.publishEvent(new AuthorizationExitEvent(authentication));
  return ok();
}
origin: qq53182347/liugh-parent

methodUrl=method.getAnnotation(GetMapping.class).value();
if(ComUtil.isEmpty(methodUrl)){
  methodUrl=method.getAnnotation(GetMapping.class).path();
origin: org.apache.servicecomb/swagger-generator-springmvc

 @Override
 public void process(Object annotation, OperationGenerator operationGenerator) {
  GetMapping mappingAnnotation = (GetMapping) annotation;
  Operation operation = operationGenerator.getOperation();

  // path/value是等同的
  this.processPath(mappingAnnotation.path(), operationGenerator);
  this.processPath(mappingAnnotation.value(), operationGenerator);
  this.processMethod(RequestMethod.GET, operationGenerator);
  this.processConsumes(mappingAnnotation.consumes(), operation);
  this.processProduces(mappingAnnotation.produces(), operation);

  if (StringUtils.isEmpty(operationGenerator.getHttpMethod())
    && StringUtils.isEmpty(operationGenerator.getSwaggerGenerator().getHttpMethod())) {
   throw new Error("HttpMethod must not both be empty in class and method");
  }
 }
}
origin: liupeng328/java-api-doc

if (StringUtil.isNotEmpty(getMapping.value())) {
  return getMapping.value()[0];
if (StringUtil.isNotEmpty(getMapping.name())) {
  return getMapping.name();
if (StringUtil.isNotEmpty(getMapping.path())) {
  return getMapping.path()[0];
org.springframework.web.bind.annotationGetMapping

Most used methods

  • <init>
  • value
  • path
  • consumes
  • name
  • produces

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • putExtra (Intent)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JTable (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now