Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有我自己的数据库处理程序和我的连接池,我只想将“我自己之前创建的”连接设置为休眠。
如果我必须使用 ConnectionProvider,但我遇到了一些问题,我是否还必须在 hibernate.cfg.xml 中配置“hibernate.connection.driver_class”或“hibernate.connection.username”等属性?
第 3 版
Connection conn = ...; Session session = sessionFactory.openSession(conn);