如下代码使用GET请求方法时,groupGuid获取到的值为null
方法一、只需要将其改为Post方式请求即可,或者把paramType = “form” 换成 paramType = "query"就行
@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);
}
方法二、只使用@GetMapping(value="/get") ,将上面两行注解删掉也可
@GetMapping(value="/get")
public Group get(String groupGuid) {
return groupService.get(groupGuid);
}