hibernate annotations和hbm.xml配置文件在spring中的并存配置
<bean id="sessionFactory"
class ="org.springframework.orm.hibernate 3.annotation .Annotation SessionFactoryBean" >
<property name="dataSource" ref="dataSource" />
<property name="mappingResources" >
<list>
<value>cn/com/iolog/model/User.hbm .xml </value>
<value>...</value>
</list>
</property>
<property name="annotatedClasses" >
<list>
<value>com.iolog.newcentury.model.user.User </value>
<value>...</value>
</list>
</property>
.......
</bean>
<property name="mappingResources">指定映射文件
<property name="annotatedClasses">指定annotation 类