We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the ParameterObject annotation dosen't work when the Controller has RequestPart annotation
ParameterObject
RequestPart
the dependency version:
My Controller like this:
@Operation(summary = "upload file") @PostMapping(consumes = MediaType.MULTIPART_FORM_DATA_VALUE) public FileInfo uploadFile(@ParameterObject FileInfoVO fileInfoVO, @RequestPart MultipartFile file) { System.out.println(fileInfoVO); return fileService.uploadFileInfo(fileInfoVO, file); }
the FileInfoVO:
public record FileInfoVO( @Schema(description = "creditId", requiredMode = REQUIRED) Long creditId, @Schema(description = "bucket name", requiredMode = REQUIRED) String bucketName, @Schema(description = "file key", requiredMode = NOT_REQUIRED) String fileKey ) {}
When I upload the file with the params of FileInfoVO, I got null like this:
FileInfoVO
FileInfoVO[creditId=null, bucketName=null, fileKey=null]
Is it a bug or I use it with wrong way? Help me pls, thx!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
the
ParameterObject
annotation dosen't work when the Controller hasRequestPart
annotationthe dependency version:
My Controller like this:
the FileInfoVO:
When I upload the file with the params of
FileInfoVO
, I got null like this:FileInfoVO[creditId=null, bucketName=null, fileKey=null]
Is it a bug or I use it with wrong way?
Help me pls, thx!
The text was updated successfully, but these errors were encountered: