From 2f8ab87988e408f0c009ab3d2fef8d68fd21aab3 Mon Sep 17 00:00:00 2001 From: Subi Hwang Date: Fri, 26 Jan 2024 14:00:57 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20*Controller=20api=20=EC=A3=BC?= =?UTF-8?q?=EC=86=8C=20=EC=88=98=EC=A0=95=20#35?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AccessoryController.java | 25 +++++++++--------- .../color/controller/ColorController.java | 2 +- .../font/controller/FontController.java | 2 +- .../pattern/controller/PatternController.java | 2 +- .../wheel/controller/WheelController.java | 26 +++++++++---------- 5 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/main/java/com/endlesshorses/oot/custom/accessory/controller/AccessoryController.java b/src/main/java/com/endlesshorses/oot/custom/accessory/controller/AccessoryController.java index 3869279..bae2f99 100644 --- a/src/main/java/com/endlesshorses/oot/custom/accessory/controller/AccessoryController.java +++ b/src/main/java/com/endlesshorses/oot/custom/accessory/controller/AccessoryController.java @@ -3,12 +3,11 @@ import com.endlesshorses.oot.custom.accessory.dto.AccessoryListResponseDto; import com.endlesshorses.oot.custom.accessory.service.AccessoryService; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.responses.ApiResponse; +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.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -18,18 +17,18 @@ @RestController @RequiredArgsConstructor @Tag(name = "Accessory", description = "액세서리 관련 API") -@RequestMapping("/accessories") +@RequestMapping("api/accessories") public class AccessoryController { - private final AccessoryService accessoryService; + private final AccessoryService accessoryService; - @GetMapping - @Operation(summary = "Accessory 목록 조회 메서드", description = "클라이언트가 요청한 액세서리 목록 정보를 조회하기 위한 메서드") - @ApiResponses({ - @ApiResponse(responseCode = "200", description = "액세서리 목록 조회 성공") - }) - public ResponseEntity> list() { - List accessoryList = accessoryService.list(); + @GetMapping + @Operation(summary = "Accessory 목록 조회 메서드", description = "클라이언트가 요청한 액세서리 목록 정보를 조회하기 위한 메서드") + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "액세서리 목록 조회 성공") + }) + public ResponseEntity> list() { + List accessoryList = accessoryService.list(); - return ResponseEntity.ok().body(accessoryList); - } + return ResponseEntity.ok().body(accessoryList); + } } diff --git a/src/main/java/com/endlesshorses/oot/custom/color/controller/ColorController.java b/src/main/java/com/endlesshorses/oot/custom/color/controller/ColorController.java index 85f5ded..0f53a91 100644 --- a/src/main/java/com/endlesshorses/oot/custom/color/controller/ColorController.java +++ b/src/main/java/com/endlesshorses/oot/custom/color/controller/ColorController.java @@ -17,7 +17,7 @@ @RestController @RequiredArgsConstructor @Tag(name = "Color", description = "색상 관련 API") -@RequestMapping("/colors") +@RequestMapping("api/colors") public class ColorController { private final ColorService colorService; diff --git a/src/main/java/com/endlesshorses/oot/custom/font/controller/FontController.java b/src/main/java/com/endlesshorses/oot/custom/font/controller/FontController.java index 094afcd..d6da000 100644 --- a/src/main/java/com/endlesshorses/oot/custom/font/controller/FontController.java +++ b/src/main/java/com/endlesshorses/oot/custom/font/controller/FontController.java @@ -17,7 +17,7 @@ @RestController @RequiredArgsConstructor @Tag(name = "Font", description = "폰트 관련 API") -@RequestMapping("/fonts") +@RequestMapping("api/fonts") public class FontController { private final FontService fontService; diff --git a/src/main/java/com/endlesshorses/oot/custom/pattern/controller/PatternController.java b/src/main/java/com/endlesshorses/oot/custom/pattern/controller/PatternController.java index 19904f4..6dd5016 100644 --- a/src/main/java/com/endlesshorses/oot/custom/pattern/controller/PatternController.java +++ b/src/main/java/com/endlesshorses/oot/custom/pattern/controller/PatternController.java @@ -16,7 +16,7 @@ @RestController @RequiredArgsConstructor @Tag(name = "Pattern", description = "패턴 관련 API") -@RequestMapping("/patterns") +@RequestMapping("api/patterns") public class PatternController { private final PatternService patternService; 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 eda7822..bfbd3f5 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 @@ -17,20 +17,20 @@ @RestController @RequiredArgsConstructor @Tag(name = "Wheel", description = "휠 모양 관련 API") -@RequestMapping("/wheels") +@RequestMapping("api/wheels") public class WheelController { - private final WheelService wheelService; - - @GetMapping - @Operation(summary = "Wheel 목록 조회 메서드", description = "클라이언트가 요청한 휠 모양 목록 정보를 조회하기 위한 메서드") - @ApiResponses({ - @ApiResponse(responseCode = "200", description = "휠 모양 목록 조회 성공"), - }) - public ResponseEntity> list() { - List wheelList = wheelService.list(); - - return ResponseEntity.ok().body(wheelList); - } + private final WheelService wheelService; + + @GetMapping + @Operation(summary = "Wheel 목록 조회 메서드", description = "클라이언트가 요청한 휠 모양 목록 정보를 조회하기 위한 메서드") + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "휠 모양 목록 조회 성공"), + }) + public ResponseEntity> list() { + List wheelList = wheelService.list(); + + return ResponseEntity.ok().body(wheelList); + } /* @GetMapping From d44115717ff8646b6db9ec24f5f6025f7c8050e9 Mon Sep 17 00:00:00 2001 From: Subi Hwang Date: Fri, 26 Jan 2024 14:03:28 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20*Controller=20api=20=EC=A3=BC?= =?UTF-8?q?=EC=86=8C=20=EC=88=98=EC=A0=95=20#35?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oot/custom/accessory/controller/AccessoryController.java | 2 +- .../oot/custom/color/controller/ColorController.java | 2 +- .../oot/custom/font/controller/FontController.java | 2 +- .../oot/custom/pattern/controller/PatternController.java | 2 +- .../oot/custom/wheel/controller/WheelController.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/endlesshorses/oot/custom/accessory/controller/AccessoryController.java b/src/main/java/com/endlesshorses/oot/custom/accessory/controller/AccessoryController.java index bae2f99..b308333 100644 --- a/src/main/java/com/endlesshorses/oot/custom/accessory/controller/AccessoryController.java +++ b/src/main/java/com/endlesshorses/oot/custom/accessory/controller/AccessoryController.java @@ -17,7 +17,7 @@ @RestController @RequiredArgsConstructor @Tag(name = "Accessory", description = "액세서리 관련 API") -@RequestMapping("api/accessories") +@RequestMapping("/api/accessories") public class AccessoryController { private final AccessoryService accessoryService; diff --git a/src/main/java/com/endlesshorses/oot/custom/color/controller/ColorController.java b/src/main/java/com/endlesshorses/oot/custom/color/controller/ColorController.java index 0f53a91..ddfda02 100644 --- a/src/main/java/com/endlesshorses/oot/custom/color/controller/ColorController.java +++ b/src/main/java/com/endlesshorses/oot/custom/color/controller/ColorController.java @@ -17,7 +17,7 @@ @RestController @RequiredArgsConstructor @Tag(name = "Color", description = "색상 관련 API") -@RequestMapping("api/colors") +@RequestMapping("/api/colors") public class ColorController { private final ColorService colorService; diff --git a/src/main/java/com/endlesshorses/oot/custom/font/controller/FontController.java b/src/main/java/com/endlesshorses/oot/custom/font/controller/FontController.java index d6da000..5b61729 100644 --- a/src/main/java/com/endlesshorses/oot/custom/font/controller/FontController.java +++ b/src/main/java/com/endlesshorses/oot/custom/font/controller/FontController.java @@ -17,7 +17,7 @@ @RestController @RequiredArgsConstructor @Tag(name = "Font", description = "폰트 관련 API") -@RequestMapping("api/fonts") +@RequestMapping("/api/fonts") public class FontController { private final FontService fontService; diff --git a/src/main/java/com/endlesshorses/oot/custom/pattern/controller/PatternController.java b/src/main/java/com/endlesshorses/oot/custom/pattern/controller/PatternController.java index 6dd5016..ca5b267 100644 --- a/src/main/java/com/endlesshorses/oot/custom/pattern/controller/PatternController.java +++ b/src/main/java/com/endlesshorses/oot/custom/pattern/controller/PatternController.java @@ -16,7 +16,7 @@ @RestController @RequiredArgsConstructor @Tag(name = "Pattern", description = "패턴 관련 API") -@RequestMapping("api/patterns") +@RequestMapping("/api/patterns") public class PatternController { private final PatternService patternService; 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 bfbd3f5..a20c554 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 @@ -17,7 +17,7 @@ @RestController @RequiredArgsConstructor @Tag(name = "Wheel", description = "휠 모양 관련 API") -@RequestMapping("api/wheels") +@RequestMapping("/api/wheels") public class WheelController { private final WheelService wheelService;