本文整理了Java中org.springframework.web.bind.annotation.RequestMethod.toString
方法的一些代码示例,展示了RequestMethod.toString
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RequestMethod.toString
方法的具体详情如下:
包路径:org.springframework.web.bind.annotation.RequestMethod
类名称: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);
}
内容来源于网络,如有侵权,请联系作者删除!