-
Notifications
You must be signed in to change notification settings - Fork 3
hotfix #140
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
Conversation
Walkthrough이번 변경에서는 Changes
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/main/java/org/ezcode/codetest/common/security/hander/CustomSuccessHandler.java(0 hunks)src/main/java/org/ezcode/codetest/presentation/usermanagement/OAuth2Controller.java(2 hunks)
💤 Files with no reviewable changes (1)
- src/main/java/org/ezcode/codetest/common/security/hander/CustomSuccessHandler.java
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: chat26666
PR: ezcode-my/backend#37
File: src/main/java/org/ezcode/codetest/infrastructure/elasticsearch/repository/ProblemElasticsearchRepositoryDsl.java:10-10
Timestamp: 2025-06-06T19:56:27.759Z
Learning: When user chat26666 mentions that code was implemented in a previous PR but explanation was missing, they may submit a follow-up PR just to add documentation/explanation without the actual implementation code.
Learnt from: minjee2758
PR: ezcode-my/backend#110
File: src/main/java/org/ezcode/codetest/domain/user/service/CustomOAuth2UserService.java:102-112
Timestamp: 2025-06-27T06:03:05.761Z
Learning: `CustomOAuth2UserService`의 `updateGithubUrl` 메서드는 새로운 유저 생성 시나 기존 유저가 새로운 AuthType을 추가할 때만 호출되므로, `UserGithubInfo` 중복 생성 가능성이 없다. 별도의 중복 체크 로직이 불필요하다.
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (1)
src/main/java/org/ezcode/codetest/presentation/usermanagement/OAuth2Controller.java (1)
11-11: 필요한 import 추가가 올바르게 되었습니다.UriComponentsBuilder import가 새로운 URL 생성 로직에 필요하며, 올바른 위치에 추가되었습니다.
| String target = UriComponentsBuilder.newInstance() | ||
| .scheme("https") | ||
| .host("ezcode.my") | ||
| .path("/oauth2/authorization/" + provider) | ||
| .build() | ||
| .toUriString(); | ||
| response.sendRedirect(target); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
URL 생성 로직은 올바르지만 하드코딩된 도메인을 개선할 수 있습니다.
UriComponentsBuilder를 사용한 절대 URL 생성은 올바르게 구현되었습니다. 하지만 "ezcode.my" 도메인이 하드코딩되어 있어 환경별 유연성이 떨어집니다.
다음과 같이 설정을 통해 도메인을 관리하는 것을 고려해보세요:
+@Value("${app.domain:ezcode.my}")
+private String appDomain;
String target = UriComponentsBuilder.newInstance()
.scheme("https")
- .host("ezcode.my")
+ .host(appDomain)
.path("/oauth2/authorization/" + provider)
.build()
.toUriString();그리고 application.yml에서 환경별로 설정:
app:
domain: ezcode.my # 또는 환경별 도메인🤖 Prompt for AI Agents
In
src/main/java/org/ezcode/codetest/presentation/usermanagement/OAuth2Controller.java
around lines 48 to 55, the domain "ezcode.my" is hardcoded in the URL
construction, reducing flexibility across environments. Refactor the code to
inject the domain value from a configuration property, such as one defined in
application.yml under app.domain, and use this injected property in
UriComponentsBuilder instead of the hardcoded string.
작업 내용
변경 사항
UserService.createUser()메서드 추가@Email유효성 검증 적용트러블 슈팅
@Transactional이 적용되지 않음this.→AopProxyUtils.사용)해결해야 할 문제
UserController에서 비즈니스 로직 일부 처리 → 서비스로 이전 고려 필요참고 사항
코드 리뷰 전 확인 체크리스트
type :)Summary by CodeRabbit
버그 수정
스타일