swagger不能使用GET方式传参

如下代码使用GET请求方法时,groupGuid获取到的值为null,只需要将其改为Post方式请求即可,因为swagger不能使用get传参数

@ApiOperation(value = “获取组对象”, notes = “get the group”, httpMethod = “GET”) //改为POST请求
@ApiImplicitParam(name = “groupGuid”, value = “组ID”, paramType = “form”, dataType = “String”, required = true)
@GetMapping(value="/get") //改为@PostMapping
public Group get(String groupGuid) {
return groupService.get(groupGuid);
}

猜你喜欢

转载自blog.csdn.net/weixin_44919928/article/details/89510225