|
|
@ -13,9 +13,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import org.apache.commons.io.FileUtils;
|
|
|
|
import org.apache.commons.io.FileUtils;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
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.http.*;
|
|
|
|
import org.springframework.lang.NonNull;
|
|
|
|
import org.springframework.lang.NonNull;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@ -26,11 +23,9 @@ import java.io.File;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
import java.net.URLEncoder;
|
|
|
|
import java.net.URLEncoder;
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
|
|
|
|
import java.nio.file.Files;
|
|
|
|
import java.nio.file.Files;
|
|
|
|
import java.nio.file.Path;
|
|
|
|
import java.nio.file.Path;
|
|
|
|
import java.nio.file.Paths;
|
|
|
|
import java.nio.file.Paths;
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Tag(name = "CtgyFileMgtController", description = "공지사항 / 게시판 관리")
|
|
|
|
@Tag(name = "CtgyFileMgtController", description = "공지사항 / 게시판 관리")
|
|
|
|
@RestController
|
|
|
|
@RestController
|
|
|
@ -38,17 +33,12 @@ import java.util.Arrays;
|
|
|
|
@RequestMapping("/api/v2/ctgy/file")
|
|
|
|
@RequestMapping("/api/v2/ctgy/file")
|
|
|
|
public class CtgyFileMgtController {
|
|
|
|
public class CtgyFileMgtController {
|
|
|
|
|
|
|
|
|
|
|
|
//private final Environment env;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${file.cmm.upload.root}")
|
|
|
|
@Value("${file.cmm.upload.root}")
|
|
|
|
private String rootPath;
|
|
|
|
private String rootPath;
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${file.cmm.upload.pboard}")
|
|
|
|
@Value("${file.cmm.upload.pboard}")
|
|
|
|
private String uploadPath;
|
|
|
|
private String uploadPath;
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${file.cmm.upload.url}")
|
|
|
|
|
|
|
|
private String serviceUrl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final ICtgyFileService service;
|
|
|
|
private final ICtgyFileService service;
|
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "파일 조회", description = "등록된 파일 조회")
|
|
|
|
@Operation(summary = "파일 조회", description = "등록된 파일 조회")
|
|
|
|