spring下使用hibernate annotation 可以省略掉*.hbm.xml文件
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource"><ref bean="dataSource" /></property>
<property name="annotatedClasses"><!-- or use <property
name="annotatedPackages"> -->
<list>
<value>security.user.model.User</value>
<value>security.user.model.Dept</value>
</list>
</property>
SCSERC_OA\src\main\resources\config\applicationContext.xml
本文介绍在Spring框架中,如何通过使用Hibernate Annotation来简化配置过程,避免了传统XML配置文件的繁琐,实现了更简洁高效的数据库操作。
2461

被折叠的 条评论
为什么被折叠?



