661 Star 4.8K Fork 1K

GVP萧明 / knife4j

 / 详情

get请求只有一个参数的情况下,调试为空,两个参数就没问题

Done
Opened this issue  
2021-09-27 16:49

输入图片输入图片说明说明

Comments (2)

724644769 created任务
724644769 set related repository to 萧明/knife4j
Expand operation logs

#IZUCU:Knife4j 提ISSUES必看

参数推荐使用另外一个注解,例如:

@ApiOperation(value = "分页查询")
@ApiImplicitParams({
    @ApiImplicitParam(name = "current_page", value = "当前页码,默认1"),
    @ApiImplicitParam(name = "page_size", value = "页码大小,默认10")
})
@GetMapping("/listByVo")
public Pagination<TestDTO> listByVo(
@RequestParam(value = "current_page", defaultValue = "1") Integer current_page,
@RequestParam(value = "page_size", defaultValue = "10") Integer page_size) {
                                                    
}

另外记得添加Spring的注解@RequestParam

萧明 set milestone to Knife4j 2.1.0版本
萧明 added
 
question
label
萧明 changed issue state from 待办的 to 已完成

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(2)
118100 xiaoym 1578918321
Java
1
https://gitee.com/xiaoym/knife4j.git
git@gitee.com:xiaoym/knife4j.git
xiaoym
knife4j
knife4j

Search

182229 41614e54 1850385 182230 7885ed45 1850385