-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/13 layer to hexagonal reserve #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/adapter/in/reserve/ReserveWebAdapter.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| package hs.kr.entrydsm.feed.adapter.`in`.reserve | ||
|
|
||
| import hs.kr.entrydsm.feed.application.reserve.port.`in`.GetReserveUseCase | ||
| import org.springframework.web.bind.annotation.GetMapping | ||
| import org.springframework.web.bind.annotation.RequestMapping | ||
| import org.springframework.web.bind.annotation.RestController | ||
|
|
||
| /** | ||
| * 예약 링크 관련 HTTP 요청을 처리하는 웹 어댑터 클래스입니다. | ||
| * | ||
| * 이 클래스는 예약 링크 조회와 관련된 HTTP 엔드포인트를 제공하며, | ||
| * 클라이언트의 요청을 적절한 서비스 메서드로 라우팅합니다. | ||
| * | ||
| * @property reserveService 예약 링크 비즈니스 로직을 처리하는 서비스 | ||
| */ | ||
| @RestController | ||
| @RequestMapping("/reserve") | ||
| class ReserveWebAdapter( | ||
| private val getReserveUseCase: GetReserveUseCase, | ||
| ) { | ||
| /** | ||
| * 예약 페이지 링크를 조회합니다. | ||
| * | ||
| * @return 예약 페이지 URL 문자열 | ||
| */ | ||
| @GetMapping | ||
| fun reserveLink(): String = getReserveUseCase.execute() | ||
| } |
14 changes: 14 additions & 0 deletions
14
...feed/src/main/kotlin/hs/kr/entrydsm/feed/application/reserve/port/in/GetReserveUseCase.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package hs.kr.entrydsm.feed.application.reserve.port.`in` | ||
|
|
||
| /** | ||
| * 예약 관련 비즈니스 로직을 정의한 인터페이스입니다. | ||
| * 예약 링크 조회 기능을 제공합니다. | ||
| */ | ||
| interface GetReserveUseCase { | ||
| /** | ||
| * 예약 페이지 링크를 조회합니다. | ||
| * | ||
| * @return 예약 페이지 URL 문자열 | ||
| */ | ||
| fun execute(): String | ||
| } |
25 changes: 25 additions & 0 deletions
25
...feed/src/main/kotlin/hs/kr/entrydsm/feed/application/reserve/service/GetReserveService.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package hs.kr.entrydsm.feed.application.reserve.service | ||
|
|
||
| import hs.kr.entrydsm.feed.application.reserve.port.`in`.GetReserveUseCase | ||
| import org.springframework.beans.factory.annotation.Value | ||
| import org.springframework.stereotype.Service | ||
|
|
||
| /** | ||
| * 예약 링크를 제공하는 서비스 클래스입니다. | ||
| * | ||
| * 이 클래스는 애플리케이션 설정에서 예약 링크를 가져와 제공하는 역할을 합니다. | ||
| * | ||
| * @property reserveLink 애플리케이션 설정에서 주입받은 예약 링크 (reserve.link) | ||
| */ | ||
| @Service | ||
| class GetReserveService( | ||
| @Value("\${reserve.link}") | ||
| private val reserveLink: String, | ||
| ) : GetReserveUseCase { | ||
| /** | ||
| * 애플리케이션 설정에 정의된 예약 링크를 반환합니다. | ||
| * | ||
| * @return 예약 페이지 URL 문자열 | ||
| */ | ||
| override fun execute() = reserveLink | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.