我有自己的数据库处理程序和连接池,我只想设置“我自己之前创建的”连接到 hibernate 。
如果我必须使用 ConnectionProvider,我会遇到一些问题, 我是否仍然必须在 hibernate.cfg.xml 中配置“hibernate.connection.driver_class”或“hibernate.connection.username”等属性?
最佳答案
版本3
Connection conn = ...;
Session session = sessionFactory.openSession(conn);
关于java - 我必须如何设置自己的 hibernate 连接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11491363/