-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Bean validation doesn't work with Kotlin coroutine controller #23152
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
Comments
In Spring official support, Coroutines are not supported with Spring MVC, and I have not been able to reproduce the issue with WebFlux, so I close this issue as invalid. Feel free to reopen with a repro project using WebFlux if you can reproduce it. |
Hello! @Configuration
class ValidationConfig {
companion object {
@Bean
@Primary
fun validator(): LocalValidatorFactoryBean {
val factoryBean = LocalValidatorFactoryBean()
factoryBean.setParameterNameDiscoverer(StandardReflectionParameterNameDiscoverer())
return factoryBean
}
}
} |
Why is this closed? I bumped into this bug with webflux environment |
@sergey-volkov-lm please review the history of the issue before commenting. In his comment that closed the issue, Sébatien mentioned that:
If you can share such project (either as a zip attached to this issue or by sharing a link to a GitHub repository) we can reopen the issue as already mentioned. |
Thank you very much for the sample @sergey-volkov-lm. |
Probably same problem: #23499 |
My Solution:
|
Any update on this? |
This issue is indeed a duplicate of #23499, Hibernate Validator needs to supports Coroutines to avoid this issue. If you care please create a related issue in Hibernate Validator and reference it in #23499. |
Affects:Spring 5.2.0.M2
Same issue as mentioned here
Adding a
@Validated
annotation to a coroutine@RestController
throws anArrayIndexOutOfBoundsException
Using Spring Boot 2.2.0.M3 and Coroutines 1.3.0-M1
The text was updated successfully, but these errors were encountered: