파일 경로 (1) 썸네일형 리스트형 Spring Boot) resource에 저장된 파일 다운로드 (JAR 파일에서도 접근 가능) jar 파일로 말면 기존 프로젝트 디렉토리랑 구조가 달라져서 resource 폴더 내에 저장된 파일 경로가 꼬이더라 그래서 사용한 방법 핵심은 이 부분!! Path filePath = Paths.get(File.separatorChar + "directory_name", File.separatorChar + fileName); Resource resource = new InputStreamResource(getClass().getResourceAsStream(filePath.toString())); Controller @GetMapping(value = "input-template-download/{fileName}") public ResponseEntity downloadResourceFile(@Pat.. 이전 1 다음