fix: 강남심사 소스 freezing

main
minuk926 2 years ago
parent 4454856cca
commit 6e43726c8a

@ -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")

@ -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 = "등록된 파일 조회")

Loading…
Cancel
Save