org.springframework.web.bind.annotation.RequestMethod.toString()方法的使用及代码示例

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

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

RequestMethod.toString介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-hateoas

/**
 * Extract {@link org.springframework.web.bind.annotation.RequestMapping}'s list of {@link RequestMethod}s into an
 * array of {@link String}s.
 * 
 * @param type
 * @param method
 * @return
 */
@Override
public Collection<HttpMethod> getRequestMethod(Class<?> type, Method method) {
  Assert.notNull(type, "Type must not be null!");
  Assert.notNull(method, "Method must not be null!");
  Annotation mergedAnnotation = findMergedAnnotation(method, annotationType);
  Object value = getValue(mergedAnnotation, "method");
  RequestMethod[] requestMethods = (RequestMethod[]) value;
  List<HttpMethod> requestMethodNames = new ArrayList<>();
  for (RequestMethod requestMethod : requestMethods) {
    requestMethodNames.add(HttpMethod.valueOf(requestMethod.toString()));
  }
  return requestMethodNames;
}

代码示例来源:origin: foxinmy/weixin4j

if (request.getMethod().equalsIgnoreCase(RequestMethod.GET.toString())) {
  return doGet(weixinRequest);
} else if (request.getMethod().equalsIgnoreCase(RequestMethod.POST.toString())) {
  return doPost(weixinRequest);
} else {

代码示例来源:origin: kongchen/swagger-maven-plugin

String httpMethod = requestMethod.toString().toLowerCase();
Operation operation = parseMethod(method, requestMethod);

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = { PUT, DELETE, PATCH, TRACE, OPTIONS })
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(GET.toString(), POST.toString()));
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = {GET, PUT, DELETE, PATCH, TRACE, OPTIONS})
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(POST.toString()));
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = {PUT, POST, DELETE, PATCH, TRACE, OPTIONS})
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(GET.toString()));
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = {GET, PUT, DELETE, PATCH, TRACE, OPTIONS})
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(POST.toString()));
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = {PUT, POST, DELETE, PATCH, TRACE, OPTIONS})
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(GET.toString()));
}

代码示例来源:origin: org.geoserver.community/gs-geogig

@RequestMapping(method = {GET, PUT, DELETE, PATCH, TRACE, OPTIONS})
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(POST.toString()));
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = {PUT, POST, DELETE, PATCH, TRACE, OPTIONS})
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(GET.toString()));
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = {PUT, POST, DELETE, PATCH, TRACE, OPTIONS})
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(GET.toString()));
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = {PUT, POST, DELETE, PATCH, TRACE, OPTIONS})
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(GET.toString()));
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = { PUT, POST, DELETE, PATCH, TRACE, OPTIONS })
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(GET.toString()));
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = {PUT, POST, DELETE, PATCH, TRACE, OPTIONS})
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(GET.toString()));
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = {PUT, POST, DELETE, PATCH, TRACE, OPTIONS})
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(GET.toString()));
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = {GET, PUT, DELETE, PATCH, TRACE, OPTIONS})
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(POST.toString()));
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = {PUT, POST, DELETE, PATCH, TRACE, OPTIONS})
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(GET.toString()));
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = {GET, PUT, DELETE, PATCH, TRACE, OPTIONS})
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(POST.toString()));
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

@RequestMapping(method = {GET, POST, DELETE, PATCH, TRACE, OPTIONS})
public void catchAll() {
  // if we hit this controller, it's a 405
  supportedMethods(Sets.newHashSet(PUT.toString()));
}

代码示例来源:origin: top.wboost/common-web

public void addAutoRequestMethod(String path, AutoRequestMethod method) {
  if (this.autoMehotdMap.get(path) == null) {
    this.autoMehotdMap.put(path, new ConcurrentHashMap<>());
  }
  this.autoMehotdMap.get(path).put(method.getRequestMapping().method()[0].toString(), method);
}

相关文章