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 getZyHome(@ModelAttribute AppDevice appDevice,@ModelAttribute AppUser appUser)

 

你可能感兴趣的:(Swagger UI 传入对象类型参数)