@Autowired
private CooperationFileService fileService;
/**
* 上传文件
*
* @param appCode 应用标识, 需要提前约定
* @param businessId 业务ID
* @param stream 文件流
* @param fileName 文件名称
* @param property 文件其他属性
* @return 文件信息
*/
CooperationFileInfo cooperationFileInfo = fileService.uploadFile(appCode,businessId,stream,fileName, property);
报错信息 org.springframework.web.client.RestClientException: Error while extracting response for type [class com.yonyou.iuap.fileservice.sdk.module.pojo.CooperationFileList$CooperationFileListDTO] and content type [application/json]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type `java.util.ArrayList<com.yonyou.iuap.fileservice.sdk.module.pojo.CooperationFileInfo$CooperationFileInfoDTO>` from Object value (token `JsonToken.START_OBJECT`); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.util.ArrayList<com.yonyou.iuap.fileservice.sdk.module.pojo.CooperationFileInfo$CooperationFileInfoDTO>` from Object value (token `JsonToken.START_OBJECT`) at [Source: (PushbackInputStream); line: 1, column: 132] (through reference chain: com.yonyou.iuap.fileservice.sdk.module.pojo.CooperationFileList$CooperationFileListDTO["data"])
|