首页 > 编程语言 > 详细

springboot集成swgger2错误解决(No enum constant org.springframework.web.bind.annotation.RequestMethod.GET,POST)

时间:2021-06-18 23:31:40      阅读:27      评论:0      收藏:0      [点我收藏+]

出现这个问题的原因,是因为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() {
    }
}

springboot集成swgger2错误解决(No enum constant org.springframework.web.bind.annotation.RequestMethod.GET,POST)

原文:https://www.cnblogs.com/zuojin/p/14900880.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!