Announcement Announcement Module
Collapse
No announcement yet.
validationMessageSource for LocalValidatorFactoryBean doesn't work Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • validationMessageSource for LocalValidatorFactoryBean doesn't work

    It seems that setup custom validationMessageSource for LocalValidatorFactoryBean doesn't work (it also doesn't work for the Greenhouse application too).

    Here part of my web config:
    <bean id="validator" class="org.springframework.validation.beanvalidati on.LocalValidatorFactoryBean">
    <property name="validationMessageSource">
    <bean class="org.springframework.context.support.Reloada bleResourceBundleMessageSource">
    <property name="defaultEncoding" value="UTF-8"/>
    <property name="basename" value="/WEB-INF/messages/validation"/>
    <property name="cacheSeconds" value="0"/>
    </bean>
    </property>
    </bean>
    And in case of any binding errors default JSR 303 messages are used.
    Of course, if I put my validation messages into web messageSource, or inject messageSource for validationMessageSource instead of the custom one, everything works fine.

    Any ideas why?
    Has anybody tried the same configuration, and it worked for you.

    Thank you.
Working...
X