摘要: 支持1: 利用ioc为dao注入sessionFactory;1.管理SessionFactory 使用Spring整合Hibernate时我们不需要hibernate.cfg.xml文件。首先,在applicationContext.xml中配置数据源(dataSource)bean和session工厂(sessionFactory)bean。其中,在配置session工厂bean时,应该注入三个方面的信息: ●数据源bean ●所有持久化类的配置文件 ●Hibernate的SessionFactory的属性;其中SessionFactory的属性信息又包括(1,Hibernate的连接方法 阅读全文
posted @ 2013-12-17 15:23 孙立庆 阅读(310) 评论(0) 推荐(0) 编辑