Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public OpenAPI openAPI() {
.description("IssueIssyu Local Server");

Server httpServer = new Server()
.url("http://issueissyu-backend-prod-env.eba-x2fpm3aq.ap-northeast-2.elasticbeanstalk.com")
.url("https://spring.issueissyu.cloud")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

운영 서버의 URL을 소스 코드에 직접 하드코딩하는 것은 환경 변화에 유연하게 대처하기 어렵게 만듭니다. 이 설정은 application.yml 등의 설정 파일로 분리하고, @Value 어노테이션이나 Environment를 통해 동적으로 주입받아 사용하는 것을 권장합니다.\n\n예를 들어, 다음과 같이 개선할 수 있습니다:\n\njava\n@Bean\npublic OpenAPI openAPI(@Value(\"${swagger.prod-url:https://spring.issueissyu.cloud}\") String prodUrl) {\n // ...\n Server httpServer = new Server()\n .url(prodUrl)\n .description(\"IssueIssyu Prod Server\");\n // ...\n}\n

.description("IssueIssyu Prod Server");


Expand Down
Loading