I have a @RestController
with the method
@PostMapping
fun uploadDocument(@Valid data: UploadData, exchange: ServerWebExchange)
where UploadData
contains a field
@field:NotNull(message = "file must not be null") private val file: FilePart?
Before the upgrade to Spring Boot 3.2.0, the Bean Validation worked as expected if "file" was missing in the request body. Since the Spring upgrade, I get the exception "No primary or single unique constructor found for interface org.springframework.http.codec.multipart.FilePart" instead.
Comment From: snicoll
Thanks for the report, this is a duplicate of #31669.
Comment From: sbrannen
And potentially a duplicate of #31778, if the affected code is using WebFlux instead of MVC.