Skip to content

[UPLUS-27] 예외 공통 처리, 상수 정의, 탭 사이즈 변경 - #9

Merged
arlen02-01 merged 6 commits into
developfrom
feat/UPLUS-27
Jan 14, 2026
Merged

arlen02-01 merged 6 commits into
developfrom
feat/UPLUS-27

Conversation

@k0081915

@k0081915 k0081915 commented Jan 14, 2026

Copy link
Copy Markdown
Member

🍀 이슈 번호

  • UPLUS-27

✅ 작업 사항

  • Clock Bean 주입
  • send day 상수 정의
  • 도메인 예외 공통 처리
  • Random -> ThreadLocalRandom 변경
  • 탭 사이즈 변경
  • AESUtil 예외 처리

📋 체크리스트

  • 코드가 정상적으로 빌드됩니다.
  • 관련 테스트 코드를 작성했습니다.
  • 기존 테스트가 모두 통과합니다.
  • 코드 스타일(Spotless, Checkstyle)을 준수합니다.

⌨ 기타

@github-actions github-actions Bot added the size/XL PR size: XL label Jan 14, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @k0081915, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 시스템의 견고성과 유지보수성을 향상시키기 위한 여러 개선 사항을 포함합니다. 주요 변경 사항으로는 시간 의존적인 로직의 테스트 용이성을 높이기 위한 Clock 빈 주입, 도메인별로 세분화된 커스텀 예외 처리 시스템 도입, 그리고 멀티스레드 환경에서 더 효율적인 난수 생성을 위한 ThreadLocalRandom 적용 등이 있습니다. 또한, 코드 스타일의 일관성을 확보하고 AESUtil의 예외 처리 로직을 강화하여 전반적인 코드 품질을 높였습니다.

Highlights

  • Clock Bean 주입: Clock 인스턴스를 Spring 빈으로 등록하여 시간 관련 로직의 테스트 용이성을 높였습니다.
  • send day 상수 정의: Subscription 엔티티 내 sendDay의 기본값을 상수로 정의하여 가독성과 유지보수성을 개선했습니다.
  • 도메인 예외 공통 처리: 도메인별 커스텀 예외(예: EntityNotFoundException, InvalidStateException, OperationFailedException)와 에러 코드(CoreErrorCode)를 도입하여 예외 처리의 일관성과 명확성을 확보했습니다.
  • Random -> ThreadLocalRandom 변경: PhoneUtil에서 Random 대신 ThreadLocalRandom을 사용하여 멀티스레드 환경에서의 성능 저하 및 경쟁 조건을 방지했습니다.
  • 탭 사이즈 변경: 코드 스타일의 일관성을 위해 여러 파일에서 탭 사이즈를 4스페이스로 변경했습니다.
  • AESUtil 예외 처리: AESUtil의 암호화/복호화 메서드에서 발생할 수 있는 예외를 커스텀 예외로 래핑하고, 키 길이 검증 로직을 추가하여 안정성을 강화했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@k0081915 k0081915 changed the title Feat/uplus 27 [UPLUS-27] 예외 공통 처리, 상수 정의, 탭 사이즈 변경 Jan 14, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

이번 PR은 Clock Bean 주입, 도메인 예외 공통 처리, ThreadLocalRandom 사용 등 테스트 용이성과 코드 품질을 높이는 여러 개선 사항을 포함하고 있습니다. 전반적으로 좋은 방향의 변경이지만, PlanService에서 전화번호 생성 로직에 스레드 안전성 문제가 있는 static 변수를 사용하고 있어 수정이 필요합니다. 해당 부분은 race condition을 유발할 수 있는 심각한 버그이므로 반드시 수정해야 합니다. 또한, 새로 추가된 에러 코드에 사소한 오타가 있어 함께 수정을 제안합니다.

Comment thread src/main/java/com/project/core/service/PlanService.java Outdated
Comment thread src/main/java/com/project/core/service/PlanService.java
Comment thread src/main/java/com/project/global/exception/code/domain/core/CoreErrorCode.java Outdated
@github-actions github-actions Bot added size/XL PR size: XL and removed size/XL PR size: XL labels Jan 14, 2026

@arlen02-01 arlen02-01 left a comment

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.

확인했습니다

@arlen02-01
arlen02-01 self-requested a review January 14, 2026 07:07

@arlen02-01 arlen02-01 left a comment

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.

확인했습니다

@arlen02-01 arlen02-01 left a comment

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.

확인했습니다

@arlen02-01
arlen02-01 merged commit 847161f into develop Jan 14, 2026
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants