Skip to content

Commit

Permalink
docs: apply swagger with msa
Browse files Browse the repository at this point in the history
  • Loading branch information
CChuYong committed Jun 15, 2024
1 parent de24fde commit 7fd0ab1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
3 changes: 2 additions & 1 deletion api-gateway/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ repositories {
extra["springCloudVersion"] = "2023.0.2"

dependencies {
implementation("org.springframework.boot:spring-boot-starter-security")
//implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.cloud:spring-cloud-starter-gateway")
implementation("org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("io.projectreactor:reactor-test")
testImplementation("org.springframework.security:spring-security-test")
Expand Down
1 change: 0 additions & 1 deletion api-gateway/src/main/resources/application.properties

This file was deleted.

29 changes: 29 additions & 0 deletions api-gateway/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
spring:
application:
name: api-gateway
cloud:
gateway:
routes:
- id: user-service
uri: https://user-service.mafoo.kr
predicates:
- Path=/user/**
- Method=GET
filters:
- RewritePath=/user/(?<segment>/?.*), /$\{segment}
- id: photo-service
uri: https://photo-service.mafoo.kr
predicates:
- Path=/photo/**
- Method=GET
filters:
- RewritePath=/photo/(?<segment>/?.*), /$\{segment}
springdoc:
swagger-ui:
urls[0]:
name: "유저 서비스"
url: https://gating.mafoo.kr/user/v3/api-docs

urls[1]:
name: "사진 서비스"
url: https://gating.mafoo.kr/photo/v3/api-docs

0 comments on commit 7fd0ab1

Please sign in to comment.