hibernate 中用sessionFactory获取连接

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

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


		Connection conn = SessionFactoryUtils.getDataSource(sessionFactory)
				.getConnection();
		
	

猜你喜欢

转载自2819272.iteye.com/blog/2205084