你的位置:首页 > 软件开发 > Java > 在springmvc中使用hibernate

在springmvc中使用hibernate

发布时间:2016-05-13 21:00:07
在springmvc. 1 <!-- 国际化配置 --> 2 <bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocal ...

在springmvc.

 1 <!-- 国际化配置 -->   2   <bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver" /> 3   <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> 4     <property name="basenames"> 5       <list> 6         <value>classpath:resource/ValidationMessages</value> 7       </list> 8     </property> 9     <property name="useCodeAsDefaultMessage" value="true" />10   </bean>11   <!-- 注册验证器 -->12   <mvc:annotation-driven validator="validator" />13 14   <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">15     <property name="providerClass" value="org.hibernate.validator.HibernateValidator" />16     <!-- 这里配置将使用上面国际化配置的messageSource -->17     <property name="validationMessageSource" ref="messageSource" />18   </bean> 

 

海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com

原标题:在springmvc中使用hibernate

关键词:Spring

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录