How to get current Connection object in Spring JDBC

后端 未结 4 2064
暖寄归人
暖寄归人 2020-12-09 01:44

How can I get the current Connection object for an Oracle database? I\'m using the JDBC module in Spring 3.0.5.

4条回答
  •  无人及你
    2020-12-09 02:20

    Use DataSourceUtils.getConnection().

    It returns connection associated with the current transaction, if any.

提交回复
热议问题