出現這個問題的原因,是因為swgger2中沒有對應的枚舉類導致的;
RequestMethod.GET,POST 后面跟的是什么,那么就是由於什么原因導致的
get:表示有 @ApiOperation(value = "xxx", httpMethod = "get")
post:表示有 @ApiOperation(value = "xxx", httpMethod = "post")
處理辦法:改成這些就好了
例如::@ApiOperation(value = "xxx", httpMethod = "POST")
public enum RequestMethod {
GET,
HEAD,
POST,
PUT,
PATCH,
DELETE,
OPTIONS,
TRACE;
private RequestMethod() {
}
}