Swagger UI 传入对象类型参数

Swagger要传送对象作为参数,只需添加@ModelAttribute或@RequestBody

@RestController
@RequestMapping("/api/json/resourceHome")
@Api(value="/api/json/resourceHome",description="资源客户端首页API")
public class ResourceClientHomeController {

    @RequestMapping(value = "/getZyHome", method ={RequestMethod.POST} )
    @ApiOperation(value = "获取资源客户端首页信息", notes = "获取资源客户端首页信息")
    public Result<ZyHomeVo> getZyHome(@ModelAttribute AppDevice appDevice,@ModelAttribute AppUser appUser)

 

posted @ 2017-07-31 17:58  Bodi  阅读(15019)  评论(0编辑  收藏  举报