Hi, I have a following spring config where I explicitly create LocalValidatorFactoryBean using my own ValidationMessageSource. I have Hibernate Validator 4.1 in my class path.
However I noticed that the LocalValidatorFactoryBean is being created twice by hitting a debug in classes "afterPropertiesSet" method. The first time is for the explicite bean I created, however following that the same class is instantiated implicitly again by DefaultListableBeanFactory class - obviously this time with no validationMessageSource. Therefore it seems that when Spring does make use of the LocalValidatorFactoryBean its using the one with the default Hibernates messagesource rather than the one I have specified.
<property name="validationMessageSource" ref="messageSource"/>
Ok, looking into this a bit further its seems that this is caused by "mvc:annotation-driven" I have in the spring config! Any pointers would still help
Any pointers would really help