Closed
Description
Hello,
I've got a problem with providing custom messages in different languages for bean validation using WebFlux. It does not use messages for locale I send in header.
I think this is a bug because LocalValidatorFactoryBean
uses LocaleContextMessageInterpolator
. Hibernate Validator calls the public String interpolate(String message, Context context) method
, which relays on the LocaleContextHolder
. It uses a ThreadLocal
which can't be used in WebFlux.
I created sample repository, I hope you find it helpful
https://github.com/jakubdyszkiewicz/webflux-validation
Thanks