From 2aa7016b26373460d72cc4729dcd9d21f4f87e01 Mon Sep 17 00:00:00 2001 From: byeon22 Date: Wed, 24 Jan 2024 01:28:32 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20RequestMapping=20=EC=B6=94=EA=B0=80,=20l?= =?UTF-8?q?ist()=EB=A1=9C=20=EB=A9=94=EC=84=9C=EB=93=9C=EB=AA=85=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wheel/controller/WheelController.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/endlesshorses/oot/custom/wheel/controller/WheelController.java b/src/main/java/com/endlesshorses/oot/custom/wheel/controller/WheelController.java index af84b25..f161bc1 100644 --- a/src/main/java/com/endlesshorses/oot/custom/wheel/controller/WheelController.java +++ b/src/main/java/com/endlesshorses/oot/custom/wheel/controller/WheelController.java @@ -7,7 +7,9 @@ import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; +import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @@ -15,20 +17,28 @@ @RestController @RequiredArgsConstructor @Tag(name = "Wheel", description = "휠 모양 관련 API") +@RequestMapping("/wheels") public class WheelController { private final WheelService wheelService; - @GetMapping("/wheel") + @GetMapping @Operation(summary = "Wheel 목록 조회 메서드", description = "클라이언트가 요청한 휠 모양 목록 정보를 조회하기 위한 메서드") @ApiResponses({ @ApiResponse(responseCode = "200", description = "휠 모양 목록 조회 성공"), - @ApiResponse(responseCode = "400(403)", description = "휠 모양 목록 조회 실패"), }) - public List findAll() { - return wheelService.list(); + public ResponseEntity list() { + List wheelList = wheelService.list(); + + return ResponseEntity.ok().body(wheelList); } /* + @GetMapping + @Operation(summary = "Wheel 목록 조회 메서드", description = "클라이언트가 요청한 휠 모양 목록 정보를 조회하기 위한 메서드") + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "휠 모양 목록 조회 성공"), + @ApiResponse(responseCode = "400(403)", description = "휠 모양 목록 조회 실패"), + }) public ResponseEntity listWheel(HttpServletRequest request) { WheelResponseDto wheelResponseDto = (WheelResponseDto) wheelService.list();