Can't get Hibernate Validator working with Spring MessageSource

后端 未结 5 979
耶瑟儿~
耶瑟儿~ 2021-02-09 17:02

I\'m trying to get Hibernate Validator setup to use messages from a Spring MessageSource. I have the following setup in my messages-context.xml:

<         


        
5条回答
  •  星月不相逢
    2021-02-09 17:53

    Hibernate Validator is looking in a different place for the locale. Try this:

    LocaleContextHolder.setLocale(locale);

提交回复
热议问题