[spring]DataSourceUtils.getConnection()要与其对称方法配合使用

    DataSourceUtils.getConnection()要与DataSourceUtils.releaseConnection()配合使用

    我原来用 DataSourceUtils.getConnection()得到conn,然后用普通conn.close()关闭。再次DataSourceUtils.getConnection()时,c3p0连接池给了我一个关闭了的connection!

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.