diff --git a/src/main/java/com/xit/biz/ctgy/v2/controller/CmmFileController.java b/src/main/java/com/xit/biz/ctgy/v2/controller/CmmFileController.java index 27ad5a0..9a538bf 100644 --- a/src/main/java/com/xit/biz/ctgy/v2/controller/CmmFileController.java +++ b/src/main/java/com/xit/biz/ctgy/v2/controller/CmmFileController.java @@ -51,27 +51,23 @@ public class CmmFileController { @Value("${file.cmm.upload.simsaPath:[simUpFile_sc1]}") private String[] judgeUploadPath; - @Value("${file.cmm.upload.url}") - private String serviceUrl; - - private final ICtgyFileService ctgyFileService; private final IResidentAndDisabledService judgeService; - @Operation(summary = "공지사항 파일 다운로드" , description = "공지사항 파일 다운로드") - @GetMapping("/download/{inCode}") - public void download(@PathVariable Long inCode, HttpServletResponse response) { - - MinInfoBoard680Dto dto = ctgyFileService.findFiles(inCode); - - String absFile = ""; - - if (Arrays.asList(env.getActiveProfiles()).contains("prod")) - absFile = dto.getInFileurl() + File.separator + dto.getInFilename(); - else - absFile = rootPath + dto.getInFileurl().split(serviceUrl)[1] + File.separator + dto.getInFilename(); - - download(absFile, dto.getInFilename(), response); - } +// @Operation(summary = "공지사항 파일 다운로드" , description = "공지사항 파일 다운로드") +// @GetMapping("/download/{inCode}") +// public void download(@PathVariable Long inCode, HttpServletResponse response) { +// +// MinInfoBoard680Dto dto = ctgyFileService.findFiles(inCode); +// +// String absFile = ""; +// +// if (Arrays.asList(env.getActiveProfiles()).contains("prod")) +// absFile = dto.getInFileurl() + File.separator + dto.getInFilename(); +// else +// absFile = rootPath + dto.getInFileurl().split(serviceUrl)[1] + File.separator + dto.getInFilename(); +// +// download(absFile, dto.getInFilename(), response); +// } @Operation(summary = "거주자/장애인 심사자료 파일 다운로드" , description = "거주자/장애인 심사자료 파일 다운로드") @GetMapping("/download/judge") diff --git a/src/main/java/com/xit/biz/ctgy/v2/controller/CtgyFileMgtController.java b/src/main/java/com/xit/biz/ctgy/v2/controller/CtgyFileMgtController.java index b7cc269..64e8a41 100644 --- a/src/main/java/com/xit/biz/ctgy/v2/controller/CtgyFileMgtController.java +++ b/src/main/java/com/xit/biz/ctgy/v2/controller/CtgyFileMgtController.java @@ -13,9 +13,6 @@ import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.apache.commons.io.FileUtils; import org.springframework.beans.factory.annotation.Value; -import org.springframework.core.env.Environment; -import org.springframework.core.io.InputStreamResource; -import org.springframework.core.io.Resource; import org.springframework.http.*; import org.springframework.lang.NonNull; import org.springframework.web.bind.annotation.*; @@ -26,11 +23,9 @@ import java.io.File; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.Arrays; @Tag(name = "CtgyFileMgtController", description = "공지사항 / 게시판 관리") @RestController @@ -38,17 +33,12 @@ import java.util.Arrays; @RequestMapping("/api/v2/ctgy/file") public class CtgyFileMgtController { - //private final Environment env; - @Value("${file.cmm.upload.root}") private String rootPath; @Value("${file.cmm.upload.pboard}") private String uploadPath; - @Value("${file.cmm.upload.url}") - private String serviceUrl; - private final ICtgyFileService service; @Operation(summary = "파일 조회", description = "등록된 파일 조회")