Skip to content

RedisRepository와 JpaRepository를 확실히 분리합니다 #393

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 8 commits into from
Jul 8, 2024

Conversation

Huuuunee
Copy link
Member

@Huuuunee Huuuunee commented Jul 8, 2024

💡 배경 및 개요

서버를 실행할때 뜨던
image
이런 로그를 없앴습니다.

Resolves: #392

📃 작업내용

저 로그가 왜 뜨나 살펴본 결과 redis 테이블에서도 CrudRepository를 상속 받는 코드가 존재하면서 Spring data JPA repository 와 Spring data redis Repository가 모두 인식되어서 redis가 이게 내 리포지토리가 맞아? 그럼 명시해줘 라는 로그였습니다.

그래서 @EnableJpaRepositories 와 @EnableRedisRepositories로 빈을 주입할때 어떤 Repository를 주입할지 분리하였습니다.

🙋‍♂️ 리뷰노트

구현 시에 고민이었던 점들 혹은 특정 부분에 대한 의도가 있었다면 PR 리뷰의 이해를 돕기 위해 서술해주세요!

또한 리뷰어에게 특정 부분에 대한 집중 혹은 코멘트 혹은 질문을 요청하는 경우에 작성하면 좋아요!

e.g. 작업을 끝내야할 시간이 얼마 없어 확장성보다는 동작을 위주로 만들었어요! 감안하고 리뷰해주세요!

✅ PR 체크리스트

템플릿 체크리스트 말고도 추가적으로 필요한 체크리스트는 추가해주세요!

  • 이 작업으로 인해 변경이 필요한 문서가 변경되었나요? (e.g. .env, 노션, README)
  • 이 작업을 하고나서 공유해야할 팀원들에게 공유되었나요? (e.g. "API 개발 완료됐어요", "환경값 추가되었어요")
  • 작업한 코드가 정상적으로 동작하나요?
  • Merge 대상 브랜치가 올바른가요?
  • PR과 관련 없는 작업이 있지는 않나요?

🎸 기타

@Huuuunee Huuuunee merged commit 1a7fa89 into develop Jul 8, 2024
1 check passed
@Huuuunee Huuuunee deleted the feature/392-repository-duplicate branch July 8, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1️⃣ Priority: High 우선순위 - 상 ⚡️performance 성능 개선
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repository를 스캔하는 과정에서 redisRepository에 JpaRepository도 등록이 되는 현상이 있어 해결합니다.
2 participants