From bd0a8a8ed15054c6f0ee4b93ac711f92e9cf6592 Mon Sep 17 00:00:00 2001 From: jinia91 Date: Tue, 28 Jun 2022 01:30:10 +0900 Subject: [PATCH] =?UTF-8?q?api=EC=96=B4=EB=85=B8=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EB=93=B1=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/myblog/blog/badge/APIController.java | 16 ++++++++++++++++ .../java/myblog/blog/badge/BadgeController.java | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/main/java/myblog/blog/badge/APIController.java diff --git a/src/main/java/myblog/blog/badge/APIController.java b/src/main/java/myblog/blog/badge/APIController.java new file mode 100644 index 00000000..349a8ba8 --- /dev/null +++ b/src/main/java/myblog/blog/badge/APIController.java @@ -0,0 +1,16 @@ +package myblog.blog.badge; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@RestController +@RequestMapping("/open-api/v1") +public @interface APIController { +} diff --git a/src/main/java/myblog/blog/badge/BadgeController.java b/src/main/java/myblog/blog/badge/BadgeController.java index 8ee29f1a..0504ed60 100644 --- a/src/main/java/myblog/blog/badge/BadgeController.java +++ b/src/main/java/myblog/blog/badge/BadgeController.java @@ -6,9 +6,10 @@ @RestController @RequiredArgsConstructor +@APIController public class BadgeController { - @GetMapping("api/v1/badges") + @GetMapping("/badges") String generateBadges() { return "" +"" +""; }