diff --git a/src/main/java/com/haedal/haedalweb/config/SwaggerConfig.java b/src/main/java/com/haedal/haedalweb/config/SwaggerConfig.java index 38f7c33..c372136 100644 --- a/src/main/java/com/haedal/haedalweb/config/SwaggerConfig.java +++ b/src/main/java/com/haedal/haedalweb/config/SwaggerConfig.java @@ -25,6 +25,7 @@ import org.springdoc.core.customizers.OperationCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; import org.springframework.http.HttpHeaders; import org.springframework.validation.FieldError; import org.springframework.web.method.HandlerMethod; @@ -42,6 +43,7 @@ version = "1.0") ) +@Profile(value = "!prod") @Configuration public class SwaggerConfig { private static final String BEARER_TOKEN_PREFIX = "Bearer"; diff --git a/src/main/java/com/haedal/haedalweb/controller/JoinController.java b/src/main/java/com/haedal/haedalweb/controller/JoinController.java index 1b97b95..30b02d4 100644 --- a/src/main/java/com/haedal/haedalweb/controller/JoinController.java +++ b/src/main/java/com/haedal/haedalweb/controller/JoinController.java @@ -41,15 +41,15 @@ public ResponseEntity resisterUser(@RequestBody @Valid JoinDTO return ResponseUtil.buildSuccessResponseEntity(SuccessCode.JOIN_SUCCESS); } - @Operation(summary = "관리자 회원가입 (개발용)") - @ApiSuccessCodeExample(SuccessCode.JOIN_SUCCESS) - @ApiErrorCodeExamples({ErrorCode.DUPLICATED_USER_ID, ErrorCode.DUPLICATED_STUDENT_NUMBER, ErrorCode.INVALID_PARAMETER}) - @PostMapping("/admin") - public ResponseEntity resisterAdmin(@RequestBody @Valid JoinDTO joinDTO) { - joinService.createAdminAccount(joinDTO); - - return ResponseUtil.buildSuccessResponseEntity(SuccessCode.JOIN_SUCCESS); - } +// @Operation(summary = "관리자 회원가입 (개발용)") +// @ApiSuccessCodeExample(SuccessCode.JOIN_SUCCESS) +// @ApiErrorCodeExamples({ErrorCode.DUPLICATED_USER_ID, ErrorCode.DUPLICATED_STUDENT_NUMBER, ErrorCode.INVALID_PARAMETER}) +// @PostMapping("/admin") +// public ResponseEntity resisterAdmin(@RequestBody @Valid JoinDTO joinDTO) { +// joinService.createAdminAccount(joinDTO); +// +// return ResponseUtil.buildSuccessResponseEntity(SuccessCode.JOIN_SUCCESS); +// } @Operation(summary = "ID 중복확인") @Parameter(name = "userId", description = "중복 확인할 ID") diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index e4b0196..20a1504 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1 +1,2 @@ spring.profiles.include=db, jwt, aws +spring.profiles.active=prod \ No newline at end of file