From 9e7503848b7f82cd472c9177b43fefe6a88c4384 Mon Sep 17 00:00:00 2001 From: leebj Date: Tue, 22 Oct 2024 11:00:03 +0900 Subject: [PATCH] =?UTF-8?q?=EC=98=88=EC=99=B8=EC=B2=98=EB=A6=AC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/fims/rent/web/Rent04Controller.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java b/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java index beff33ad..151482aa 100644 --- a/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java +++ b/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java @@ -96,6 +96,11 @@ public class Rent04Controller extends ApplicationController { byte[] bytesOfFile = file.getBytes(); InputStream in = new ByteArrayInputStream(bytesOfFile); XSSFWorkbook workbook = new XSSFWorkbook(in); + + try { + + + in.close(); int rowNo = 0; @@ -224,6 +229,9 @@ public class Rent04Controller extends ApplicationController { mav.addObject("data", result); mav.addObject("saved", true); + } catch(Exception e) { + workbook.close(); + } return mav; }