Skip to content
New issue

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

No primary or single unique constructor found for interface org.springframework.http.codec.multipart.FilePart #31790

Closed
huberchrigu opened this issue Dec 8, 2023 · 2 comments
Labels
status: duplicate A duplicate of another issue

Comments

@huberchrigu
Copy link

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 8, 2023
@snicoll
Copy link
Member

snicoll commented Dec 8, 2023

Thanks for the report, this is a duplicate of #31669.

@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2023
@snicoll snicoll added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Dec 8, 2023
@sbrannen
Copy link
Member

sbrannen commented Dec 8, 2023

And potentially a duplicate of #31778, if the affected code is using WebFlux instead of MVC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

4 participants