How to completely disable JDBC Connection Pooling in Spring / Tomcat?

后端 未结 1 1959
予麋鹿
予麋鹿 2021-01-24 06:44

I\'m using a Spring Data Source bean to configure a JDBC connection.

What\'s the easiest way to have this return a bare, unpooled / unmanaged JDBC connection?

相关标签:
1条回答
  • 2021-01-24 06:51

    I think you are looking for org.springframework.jdbc.datasource.SimpleDriverDataSource this class is a very simple implementation of javax.sql.DataSource and doesn't implement connection pooling, instead it always returns a new connection.

    You can find source code here

    0 讨论(0)
提交回复
热议问题