From 6faecce6a721556a48f9d1992721a1d980d07e03 Mon Sep 17 00:00:00 2001 From: hojooo Date: Sun, 20 Jul 2025 19:52:56 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=EB=A7=A4=EC=B9=98=20uri=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .../java/com/example/moim/match/controller/MatchController.java | 2 +- src/main/resources/application.properties | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 87be0d8..0e801fd 100644 --- a/.gitignore +++ b/.gitignore @@ -43,4 +43,5 @@ application-test.properties application-s3.properties test_img_dir +/src/main/resources/ **/src/main/resources/secret diff --git a/src/main/java/com/example/moim/match/controller/MatchController.java b/src/main/java/com/example/moim/match/controller/MatchController.java index c179e00..06b955b 100644 --- a/src/main/java/com/example/moim/match/controller/MatchController.java +++ b/src/main/java/com/example/moim/match/controller/MatchController.java @@ -142,7 +142,7 @@ public BaseResponse matchRecordSave(@PathVariable Long matchI } //매치 메인 페이지(대시보드) - @GetMapping("match/main/{clubId}") + @GetMapping("/match/main/{clubId}") public BaseResponse findMatchMain(@PathVariable Long clubId, @AuthenticationPrincipal UserDetailsImpl userDetailsImpl) { return BaseResponse.onSuccess(matchService.matchMainFind(clubId), ResponseCode.OK); } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f606312..a07c1ff 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1 +1 @@ -spring.profiles.include=local, s3 \ No newline at end of file +spring.profiles.include=test, s3 \ No newline at end of file From 73bc53c5f7c4ec3034ae8266dffcc339c975bd71 Mon Sep 17 00:00:00 2001 From: hojooo Date: Sun, 20 Jul 2025 19:57:30 +0900 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20=EC=8A=A4=EC=9B=A8=EA=B1=B0=20autho?= =?UTF-8?q?rization=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../moim/config/swagger/SwaggerConfig.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/main/java/com/example/moim/config/swagger/SwaggerConfig.java diff --git a/src/main/java/com/example/moim/config/swagger/SwaggerConfig.java b/src/main/java/com/example/moim/config/swagger/SwaggerConfig.java new file mode 100644 index 0000000..274e8b9 --- /dev/null +++ b/src/main/java/com/example/moim/config/swagger/SwaggerConfig.java @@ -0,0 +1,34 @@ +package com.example.moim.config.swagger; + +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.security.SecurityRequirement; +import io.swagger.v3.oas.models.security.SecurityScheme; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class SwaggerConfig { + @Bean + public OpenAPI customOpenAPI() { + SecurityScheme bearerAuthScheme = new SecurityScheme() + .type(SecurityScheme.Type.HTTP) + .scheme("bearer") + .bearerFormat("JWT") + .in(SecurityScheme.In.HEADER) + .name("Authorization"); + + SecurityRequirement securityRequirement = new SecurityRequirement() + .addList("BearerAuth"); + + return new OpenAPI() + .info(new Info() // API 문서의 기본 정보 + .title("MatchDay API") + .description("MatchDay 백엔드 API 문서") + .version("v1.0.0")) + .components(new Components() + .addSecuritySchemes("BearerAuth", bearerAuthScheme)) + .addSecurityItem(securityRequirement); + } +}