JDBC,关闭资源,按获取顺序倒序关闭
/**
* 关闭资源,按获取顺序倒序关闭
*/
public static void closeAll(AutoCloseable... closeables) {
for (AutoCloseable closeable : closeables) {
try {
if (closeable != null) {
closeable.close();
}
} catch (Throwable ignored) {
}
}
}

浙公网安备 33010602011771号