spring 3.0 MVC seems to be ignoring messages.properties

后端 未结 1 1825
故里飘歌
故里飘歌 2021-01-13 10:44

Spring 3.0 MVC

First of all, I haven\'t found any documentation regarding messages.properties @ springsource Everything I\'ve found about overriding error messages

相关标签:
1条回答
  • 2021-01-13 11:30

    An associate of mine pointed me in the right direction. I changed the messageSource bean in myservlet.xml

    from

    <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
        <property name="basename" value="messages" />
        <property name="cacheSeconds" value="1" />
    </bean>
    

    to

    <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
        <property name="basename" value="messages"/>
    </bean>
    

    For whatever reason this solved the problem. Thanks associate! :)

    0 讨论(0)
提交回复
热议问题