Java – hibernate validator, custom resourcebundlelocator and spring

I tried to override the default resourcebundlelocator in Hibernate authentication 4.1 So far, it works perfectly, but the only examples it uses include java code that instantiates the validation tool

When using spring application for hibernate automatic configuration (only appropriate hibernate authentication *. Jar file should exist and will be used automatically) In this case, how to replace resourcebundlelocator? In any property or ApplicationContext XML file, I don't see any method to customize resourcebundlelocator

Solution

The magic of the required work is localvalidatorfactorybean #setvalidationmessagesource (MessageSource)

First, the contract method: –

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>