1

我有我自己的数据库处理程序和我的连接池,我只想将“我自己之前创建的”连接设置为休眠。

如果我必须使用 ConnectionProvider,但我遇到了一些问题,我是否还必须在 hibernate.cfg.xml 中配置“hibernate.connection.driver_class”或“hibernate.connection.username”等属性?

4

1 回答 1

0

第 3 版

Connection conn = ...;
Session session = sessionFactory.openSession(conn);
于 2012-07-15T11:36:43.037 回答