From 324357c78fa7eaa4baaf08f9910f9ee2acd9b1c6 Mon Sep 17 00:00:00 2001 From: 101 Date: Fri, 8 Mar 2024 20:24:16 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AA=A8=EB=93=A0=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EC=84=9C=EB=B9=84=EC=8A=A4=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/daemawiki/domain/file/api/FileController.java | 5 +++++ .../daemawiki/domain/file/component/service/GetFile.java | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/main/java/com/example/daemawiki/domain/file/api/FileController.java b/src/main/java/com/example/daemawiki/domain/file/api/FileController.java index df29df8a..1ec7058e 100644 --- a/src/main/java/com/example/daemawiki/domain/file/api/FileController.java +++ b/src/main/java/com/example/daemawiki/domain/file/api/FileController.java @@ -48,4 +48,9 @@ public Flux getFileByName(@NotBlank @RequestParam("name") String name) { return getFile.getFileByName(name); } + @GetMapping("/list") + public Flux getAll() { + return getFile.getAll(); + } + } diff --git a/src/main/java/com/example/daemawiki/domain/file/component/service/GetFile.java b/src/main/java/com/example/daemawiki/domain/file/component/service/GetFile.java index faca8f54..11d623f9 100644 --- a/src/main/java/com/example/daemawiki/domain/file/component/service/GetFile.java +++ b/src/main/java/com/example/daemawiki/domain/file/component/service/GetFile.java @@ -26,4 +26,8 @@ public Flux getFileByName(String fileName) { return fileRepository.findByFileNameContaining(fileName); } + public Flux getAll() { + return fileRepository.findAll(); + } + }