swagger 报错: TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot h

swagger 报错:

      TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body.

 

      有@ResponseBody才会在接口中获取swagger列表

 

      是由于方法中申明的是get方法却用了@requestBody 

 

      故将get 请求改为post 请求即可

posted @ 2020-07-18 10:58  猿码哥  阅读(7323)  评论(1编辑  收藏  举报