<bean id="customerBinding" class="org.springframework.web.bind.support.ConfigurableWebBindingInitializer"><property name="validator" ref="validator"></property></bean><bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"><property name="providerClass" value="org.hibernate.validator.HibernateValidator"/><!--不設(shè)置則默認爲(wei)classpath下的(de) ValidationMessages.properties --><property name="validationMessageSource" ref="validatemessageSource" /></bean><bean id="validatemessageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"><property name="basename" value="classpath:validatemessages" /><property name="fileEncodings" value="utf-8" /><property name="cacheSeconds" value="120" /></bean>
參考資(zi)料:
http://www.cnblogs.com/whgk/p/7191152.html
https://my.oschina.net/shyloveliyi/blog/525252
- 版權所有(yǒu):奇站網絡 轉載請(qing)注明出處
- 廈們(men)奇站網絡科(ke)技(ji)有(yǒu)限(xian)公(gōng)司,專(zhuan)業提供網站建(jian)設(shè),響應式(shi)網站建(jian)設(shè),小(xiǎo)程(cheng)序開髮(fa),係(xi)統定製(zhi)開髮(fa)。
- 軟件開髮(fa)咨詢熱線(xiàn):吳小(xiǎo)姐 13313868605
