デフォルトの ValidationMessages.properties を他のものに変更しようとしています。しかし、私はそれを理解していません。
私のセットアップ:
春に。
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list>
<value>text</value>
<value>error</value>
</list>
</property>
</bean>
<bean name="validator"
class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
<property name="validationMessageSource">
<ref bean="messageSource"/>
</property>
</bean>
text.properties および tex_XX.properties 内。
edit.profile.password.size=Password must be between {min} and {max}
注釈の例。
@Size(min=4, max=8, message="{edit.profile.password.size}")