Skip to content
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

[Refactor]: UserContext 수정 및 적용 #101

Merged
merged 2 commits into from
Mar 5, 2024
Merged

[Refactor]: UserContext 수정 및 적용 #101

merged 2 commits into from
Mar 5, 2024

Conversation

wu-seong
Copy link
Contributor

PULL REQUEST

🎋 작업중인 브랜치

💡 작업동기

스크린샷 2024-02-29 오전 9 16 25
  • 테스트 환경에서 순환참조가 생겨서 이를 끊기 위해서

🔑 주요 변경사항

  • UserContext User저장 -> UserId 저장으로 변경
  • UserContext.getUser() 사용 부분 모두 수정
  • FilterConfig 부분 UserService 의존성 제거

💡 관련 이슈

x

@wu-seong wu-seong added the ♻️ refactor 코드 리팩토링 label Feb 29, 2024
@wu-seong wu-seong self-assigned this Feb 29, 2024
@wu-seong wu-seong linked an issue Feb 29, 2024 that may be closed by this pull request
2 tasks
Copy link
Contributor

@kimjm9841 kimjm9841 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~! 이제 테스트는 다 성공 뜨나요?

@@ -20,18 +21,21 @@
public class FeedServiceImpl implements FeedService {

private final FeedRepository feedRepository;
private final UserService userService;
Copy link
Contributor

Choose a reason for hiding this comment

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

리포지토리 말고 서비스를 호출한 이유가 있을까용?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

수정한 테스트는 이제 순환참조 오류 안뜨고 성공하고, 리파지토리에 대한 의존성을 직접 가지는 것보다는 이미 그 리파지토리를 활용한 서비스에 의존하는게 더 좋은 구조라고 생각해서 그렇게 뒀습니다!

Copy link
Contributor

@threeony threeony left a comment

Choose a reason for hiding this comment

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

확인이요

@wu-seong wu-seong merged commit ccdfe0c into dev Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♻️ refactor 코드 리팩토링
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[refactor]: UserContext 수정
3 participants