You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.util.ArrayList<?>] to type [@org.springframework.web.bind.annotation.RequestBody @jakarta.validation.Valid java.util.List<cn.itbox.uap.sys.setting.application.model.OssSyncFileInfoRequest>] for value '[{platform=2, fileName=ocr-1721699518782.png, directoryId=62871482305351680, uniqueFileName=E0FC312A-C065-4F5A-86CB-85DBA6A9AC26-1721699520039_.ocr-1721699518782.png, ossFileKey=temp/E0FC312A-C065-4F5A-86CB-85DBA6A9AC26-1721699520039_.ocr-1721699518782.png, fileSize=3}]'
code
@PostMapping(value = "/oss/batchSyncFileInfo")
List<OssSyncFileInfoResponse> batchSyncFileInfo(@RequestBody @Valid List<OssSyncFileInfoRequest> list) throws IOException;
@Override
public List<OssSyncFileInfoResponse> batchSyncFileInfo(@RequestBody @Valid List<OssSyncFileInfoRequest> list) throws IOException {
List<OssSyncFileInfoResponse> result = new ArrayList<>();
for (OssSyncFileInfoRequest fileInfo : list) {
result.add(this.syncFileInfo(fileInfo));
}
return result;
}
Pre-check
Search before asking
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
JDK 17 <dubbo3.version>3.3.0-beta.4</dubbo3.version>
Steps to reproduce this issue
scene
we use triple protocol
send request like :
curl --location 'http://127.0.0.1:8080/oss/batchSyncFileInfo' \ --header 'x-mse-tag: xingzhihe' \ --header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \ --header 'Content-Type: application/json' \ --data '[{ "platform": 2, "fileName": "ocr-1721699518782.png", "directoryId": "62871482305351680", "uniqueFileName": "E0FC312A-C065-4F5A-86CB-85DBA6A9AC26-1721699520039_.ocr-1721699518782.png", "ossFileKey": "temp/E0FC312A-C065-4F5A-86CB-85DBA6A9AC26-1721699520039_.ocr-1721699518782.png", "fileSize": 3 }]'
but result error:
org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.util.ArrayList<?>] to type [@org.springframework.web.bind.annotation.RequestBody @jakarta.validation.Valid java.util.List<cn.itbox.uap.sys.setting.application.model.OssSyncFileInfoRequest>] for value '[{platform=2, fileName=ocr-1721699518782.png, directoryId=62871482305351680, uniqueFileName=E0FC312A-C065-4F5A-86CB-85DBA6A9AC26-1721699520039_.ocr-1721699518782.png, ossFileKey=temp/E0FC312A-C065-4F5A-86CB-85DBA6A9AC26-1721699520039_.ocr-1721699518782.png, fileSize=3}]'
code
OssSyncFileInfoRequest is defined
What you expected to happen
return result
···
{
"code": "0000",
"message": "suceess",
"data": null,
"success": true,
"timestamp": 1721720506935
}
···
Anything else
debug info
Correct code
we repair and expend this ,now is run ok
Are you willing to submit a pull request to fix on your own?
Code of Conduct
The text was updated successfully, but these errors were encountered: