`

hibernate 中用sessionFactory获取连接

 
阅读更多
Hibernate3.3.2版本中getSession().connection()已被弃用,替代方法SessionFactoryUtils.getDataSource(getSessionFactory()).getConnection()

来自类org.springframework.orm.hibernate3.SessionFactoryUtils


		Connection conn = SessionFactoryUtils.getDataSource(sessionFactory)
				.getConnection();
		
	
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics