Swagger2上傳檔案方法註解
阿新 • • 發佈:2019-01-27
@ApiOperation(value = "合同檔案上傳", notes = "合同檔案上傳") @ApiImplicitParam(name = "assetId", value = "憑證ID", required = true, dataType = "String", paramType = "String") @RequestMapping(value = "/contract/upload", method = RequestMethod.POST, headers = "content-type=multipart/form-data") @ResponseBody public ResultEntity<Object> contractUpload(HttpServletRequest request, @ApiParam(value = "上傳的檔案", required = true) @RequestParam(value = "file", required = true) MultipartFile file, @RequestParam(value = "assetId", required = true) String assetId) { String subBusinessType = UploadFileTypeEnum.CONTRACT.getCode(); return upload(request, file, assetId, subBusinessType); }