关于报错:Failed to execute ‘fetch’ on ‘Window’: Request with GET/HEAD method cannot h

报错原因:
1):说明在get请求中不能使用@RequestBody这个注解,却在get请求中使用了@RequestBody注解;
2):在@ApiOperation(value = “POST /roles : create a new role.”, notes = “POST /roles : create a new role.”,httpMethod = “POST”)这个注解中的httpMethod属性值写成了GET,将这个GET改为post/put即可

Logo

鸿蒙生态一站式服务平台。

更多推荐