hibernate annotations和hbm.xml配置文件在spring中的并存配置
因为整合了不同的系统,一套系统使用的是hibernate annotation,另一套系统使用的是hbm.xml
偷懒不想重构,又不想修改太多,所以决定整合hibernate annotations和hbm.xml
# <bean id="sessionFactory" # 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>#