Skip to content

Commit

Permalink
open api server url 설정을 변경한다
Browse files Browse the repository at this point in the history
  • Loading branch information
anjeongkyun committed Dec 11, 2023
1 parent 05dc7b7 commit 5cc6cb0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
16 changes: 11 additions & 5 deletions api/src/main/kotlin/org/tagwonder/configs/OpenApiConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@ package org.tagwonder.configs

import io.swagger.v3.oas.models.OpenAPI
import io.swagger.v3.oas.models.info.Info
import io.swagger.v3.oas.models.servers.Server
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration


@Configuration
open class OpenApiConfig {
@Bean
open fun openAPI(): OpenAPI {
val info: Info = Info()
.version("v1.0.0")
.title("Tag Wonder Api Document")
open fun openAPI(
@Value("\${api.url}") url: String
): OpenAPI {
return OpenAPI()
.info(info)
.servers(listOf(Server().apply { setUrl(url) }))
.info(
Info()
.version("v1.0.0")
.title("Tag Wonder Api Document")
)
}
}
3 changes: 3 additions & 0 deletions api/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
server:
port: 8080

api:
url: https://tag-wonder.co.kr

spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
Expand Down

0 comments on commit 5cc6cb0

Please sign in to comment.