2
我想每个使用spring的人都使用表单绑定和验证。而且你们都定义了消息以显示验证错误。我在配置中使用了它:弹出多个错误消息
<bean id="messageSource"
class="org.springframework.context.support.ResourceBundleMessageSource"
p:basename="messages" />
会发生什么基本上是它会读取项目根文件夹中的messages.properties。
但我需要把消息放在两个单独的文件中。因为应用的一部分必须是独立的。我试图在上面的那个之后加上这个:
<bean id="messageSourceAssistenza"
class="org.springframework.context.support.ResourceBundleMessageSource"
p:basename = "com.mypackage.other.assistenzamessages.properties"
/>
但是它根本无法解决这些消息。如何解决这个问题?