读书人

Spring调整hibernate配置模版

发布时间: 2012-09-11 10:49:03 作者: rapoo

Spring整合hibernate配置模版
下面是用一个具体例子写的模版(支持annotation的配置),需要时稍微改改就行:



被注释掉的部分是xxx.hbm.xml配置文件的设置。但是用于annotation的配置同样也可以用与hbm文件配置,因为org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean继承了org.springframework.orm.hibernate3.LocalSessionFactoryBean。

读书人网 >软件架构设计

热点推荐