Swagger要傳送對象做爲參數,只需添加@ModelAttribute或@RequestBodyjson
@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)