1
デフォルトのValidationMessages.propertiesをotherに変更しようとしています。しかし、私はそれを取得しません。Hibernate ValidatorでValidationMessages.propertiesをどのように変更しますか?
マイセットアップ:
春です。 text.propertiesとtex_XX.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>
。
edit.profile.password.size=Password must be between {min} and {max}
注釈の例。
@Size(min=4, max=8, message="{edit.profile.password.size}")