From 3170d1a511f2c3b16572f1b9453a89297cc5b233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=EB=AF=BC=ED=98=95?= Date: Wed, 12 Jun 2024 17:45:18 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B4=80=EB=A0=A8=EC=82=AC=EC=9D=B4=ED=8A=B8?= =?UTF-8?q?=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=95=88=EB=B3=B4=EC=9D=B4?= =?UTF-8?q?=EB=8A=94=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/config/AdminConfigController.java | 12 ++++++++---- .../kcscbackend/config/security/WebMvcConfig.java | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/config/AdminConfigController.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/config/AdminConfigController.java index 3edaf78..5540cbd 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/config/AdminConfigController.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/config/AdminConfigController.java @@ -507,7 +507,7 @@ public class AdminConfigController extends BaseController { @ApiResponse(responseCode = "403", description = "인가된 사용자가 아님") }) @RequestMapping(method = RequestMethod.GET, value = "/about-site-mgt/list", consumes = MediaType.APPLICATION_JSON_VALUE) - public ResultVO getPartnerSiteList(@AuthenticationPrincipal LoginVO user, HttpServletRequest request) throws Exception { + public ResultVO getPartnerSiteList() throws Exception { ResultVO resultVO = new ResultVO(); Map resultMap = new HashMap<>(); List tnPartnerSite = configService.selectPartnerSiteList(); @@ -537,10 +537,14 @@ public class AdminConfigController extends BaseController { @ApiResponse(responseCode = "403", description = "인가된 사용자가 아님") }) @RequestMapping(method = RequestMethod.GET, value = "/about-site-mgt/get-site-image") - public void getSiteImage(@AuthenticationPrincipal LoginVO user, HttpServletRequest request, HttpServletResponse response, @RequestParam String fileGrpId) throws Exception { + public void getSiteImage(HttpServletResponse response, @RequestParam String fileGrpId) throws Exception { List dbImgList = fileService.findByFileGrpId(fileGrpId); - String realFile = dbImgList.get(0).getFilePath(); - String fileNm = dbImgList.get(0).getFileNewName(); + String realFile = ""; + String fileNm = ""; + if (!dbImgList.isEmpty()) { + realFile = dbImgList.get(0).getFilePath(); + fileNm = dbImgList.get(0).getFileNewName(); + } BufferedOutputStream out = null; InputStream in = null; diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/config/security/WebMvcConfig.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/config/security/WebMvcConfig.java index a0491a0..a35c4f0 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/config/security/WebMvcConfig.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/config/security/WebMvcConfig.java @@ -30,7 +30,8 @@ public class WebMvcConfig implements WebMvcConfigurer { registry.addInterceptor(authCheckInterceptor) .addPathPatterns("/admin/**") .excludePathPatterns( - "/admin/dashboard/**" + "/admin/dashboard/**", + "/admin/config/about-site-mgt/get-site-image/**" ); } @Override