Spring configuration of C3P0 with Hibernate?

后端 未结 2 1204
梦如初夏
梦如初夏 2021-01-02 05:23

I have a Spring/JPA application with Hibernate as the JPA provider. I\'ve configured a C3P0 data source in Spring via:



        
2条回答
  •  隐瞒了意图╮
    2021-01-02 05:59

    The hibernate-c3p0.jar provides the class org.hibernate.connection.C3P0ConnectionProvider, a C3P0-based implementation of the Hibernate ConnectionProvider contract. You need this artifact when you want to use C3P0 as Hibernate's standalone connection pool (that you configure through the hibernate.cfg.xml file). Since you're using Spring, you don't need it.

提交回复
热议问题