hotfix [#81] ArtistResolver 수동으로 매핑하는 방법으로 변경 #82
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.
✨ Issue Number ✨
closes #81
✨ To-do ✨
✨ Description ✨
기존 리플렉션을 사용하는 방법은 확장성을 고려해서 선택했지만 구현에 실패했습니다.
따라서 조회 대상 클래스에 따라 조회하는 방법을 지정한 함수를 연결하는 방법으로 바꿨습니다.
타겟이 리스트일 경우 순회하며 탐색하고, 아닐 경우 기존에 등록된 클래스인지 확인합니다.
이후 기존에 등록된 클래스일 경우 지정된 함수를 실행해 아티스트 아이디를 모으고, 아티스트 아이디와 객체를 매퍼에 등록해 SpotifyAPIHandler에서 정보를 조회한 후 주입될 수 있도록 합니다.