【发布时间】:2011-11-03 20:27:41
【问题描述】:
applicationContext-Service.xml
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames">
<list><value>messages</value></list>
</property>
</bean>
我在 /src/messages_en_US.properties 下有 messages_en_US.properties
registerForm.passwordNotMatch=Password does not match.
这是导致错误的代码行:
binding.addError(new FieldError(REGISTER_FORM, "passwordNotMatch", messageSource.getMessage("registerForm.passwordNotMatch", null, locale)));
错误:在区域设置“en_US”的代码“registerForm.passwordNotMatch”下找不到消息。
可能出了什么问题?
【问题讨论】:
-
applicationContext-Service.xml声明在哪里?