From 2bfef4beed8a51033da6ec144946e96be15b58c1 Mon Sep 17 00:00:00 2001 From: zillionme Date: Tue, 10 Oct 2023 21:12:12 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20JdbcTemplate=20=EC=BB=A4=EB=84=A5?= =?UTF-8?q?=EC=85=98=20=ED=95=B4=EC=A0=9C=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/springframework/jdbc/core/JdbcTemplate.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java b/jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java index 1d84f80496..7ccfddf2f1 100644 --- a/jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java +++ b/jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java @@ -63,6 +63,8 @@ private T execute(final String sql, final Object[] args, final PreparedState } catch (SQLException e) { log.error(e.getMessage(), e); throw new DataAccessException(e); + } finally { + DataSourceUtils.releaseConnection(conn, dataSource); } } }