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

fix: ZonedDateTime ObjectMapper가 인식하도록 수정 #704

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

seulgi99
Copy link
Contributor

@seulgi99 seulgi99 commented Aug 28, 2024

🌱 관련 이슈

📌 작업 내용 및 특이사항

📝 참고사항

📚 기타

Summary by CodeRabbit

  • 새로운 기능

    • 주문 조회 메서드의 로직을 수정하여 recruitmentRound와의 비교를 반영했습니다.
    • Zoned Date-Time 형식의 유효성 검사를 위한 정규 표현식을 추가했습니다.
    • JSON 직렬화 및 역직렬화를 위한 ZonedDateTime 지원을 추가했습니다.
  • 버그 수정

    • 날짜-시간 처리의 유연성을 개선했습니다.

@seulgi99 seulgi99 added the 🐛 bug/error 버그 및 에러 픽스 label Aug 28, 2024
@seulgi99 seulgi99 self-assigned this Aug 28, 2024
@seulgi99 seulgi99 requested a review from a team as a code owner August 28, 2024 10:53
Copy link

coderabbitai bot commented Aug 28, 2024

Walkthrough

이번 변경 사항은 OrderQueryMethod 인터페이스의 eqRecruitmentRound() 메서드에서 recruitment.idrecruitmentRound.id로 참조를 변경하고, RegexConstant 클래스에 Zoned Date-Time 형식을 위한 새로운 정규 표현식을 추가하며, ObjectMapperConfig 클래스에 ZonedDateTime을 지원하는 새로운 역직렬화기를 추가하는 내용을 포함합니다.

Changes

파일 경로 변경 요약
src/main/java/com/gdschongik/gdsc/domain/order/dao/OrderQueryMethod.java eqRecruitmentRound() 메서드의 반환문에서 recruitment.idrecruitmentRound.id로 변경.
src/main/java/com/gdschongik/gdsc/global/common/constant/RegexConstant.java ZONED_DATETIME 상수를 추가하여 Zoned Date-Time 형식을 정의.
src/main/java/com/gdschongik/gdsc/global/config/ObjectMapperConfig.java ZonedDateTime을 처리하기 위한 새로운 역직렬화기 ZonedDateTimeDeserializer 추가 및 등록.

Assessment against linked issues

Objective Addressed Explanation
ZonedDateTime ObjectMapper가 인식하도록 수정 (#703)

변화의 바람이 불어와,
토끼들이 춤을 추네,
Zoned Date-Time이 환하게,
코드 속에 깃들어 있네.
새로운 길이 열렸으니,
기쁜 마음으로 뛰어가자! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 12519a9 and 0c15ab8.

Files selected for processing (3)
  • src/main/java/com/gdschongik/gdsc/domain/order/dao/OrderQueryMethod.java (1 hunks)
  • src/main/java/com/gdschongik/gdsc/global/common/constant/RegexConstant.java (1 hunks)
  • src/main/java/com/gdschongik/gdsc/global/config/ObjectMapperConfig.java (4 hunks)
Additional comments not posted (3)
src/main/java/com/gdschongik/gdsc/global/common/constant/RegexConstant.java (1)

12-12: 정규 표현식 상수 추가 승인

새로운 시간대 정보를 포함한 날짜-시간 형식에 대한 정규 표현식 상수 ZONED_DATETIME이 잘 추가되었습니다. 이는 시간대를 고려한 날짜 처리에 필수적입니다.

src/main/java/com/gdschongik/gdsc/domain/order/dao/OrderQueryMethod.java (1)

33-33: 메서드 로직 변경 승인

eqRecruitmentRound() 메서드에서 recruitment.id 대신 recruitmentRound.id를 참조하도록 변경된 것은 적절해 보입니다. 이 변경이 기능적으로 의도된 바와 일치하는지 추가 검증이 필요할 수 있습니다.

다음 스크립트를 실행하여 변경 사항이 의도된 기능과 일치하는지 확인하세요:

Verification successful

메서드 로직 변경 확인 완료

eqRecruitmentRound() 메서드에서 recruitment.id 대신 recruitmentRound.id를 참조하도록 변경한 것은 코드베이스의 다른 부분과 일관되며 기능적으로 적절한 것으로 보입니다. 이 변경은 의도된 기능과 일치합니다.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `eqRecruitmentRound` method in the application.

# Test: Search for the method usage. Expect: Only occurrences with the new reference.
rg --type java -A 5 $'eqRecruitmentRound'

Length of output: 1418


Script:

#!/bin/bash
# Search for the definition and usage of `recruitmentRoundId` in the codebase
rg --type java 'recruitmentRoundId'

# Search for the definition and usage of `recruitmentRound.id` in the codebase
rg --type java 'recruitmentRound.id'

Length of output: 3919

src/main/java/com/gdschongik/gdsc/global/config/ObjectMapperConfig.java (1)

117-124: 새로운 ZonedDateTimeDeserializer 클래스 추가 승인

ZonedDateTime 타입을 처리하기 위한 새로운 디시리얼라이저 클래스가 추가되었습니다. 이 클래스는 JSON 문자열에서 ZonedDateTime 객체를 올바르게 파싱할 수 있도록 구현되어 있습니다. 이 구현이 기능적 요구사항과 코딩 표준을 충족하는지 검토가 필요합니다.

Copy link
Member

@uwoobeat uwoobeat left a comment

Choose a reason for hiding this comment

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

lgtm

Comment on lines 45 to 46
// ZonedDateTime
module.addDeserializer(ZonedDateTime.class, new ZonedDateTimeDeserializer());
Copy link
Member

Choose a reason for hiding this comment

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

ZonedDateTime은 serializer 필요없나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

이게 저장엔 문제없어서 추가하지않았엇는데
이번 커밋으로 JavaTimeModule로 교체하면서 추가하게 되었습니다!

Copy link
Member

@AlmondBreez3 AlmondBreez3 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0c15ab8 and e4b1331.

Files selected for processing (1)
  • src/main/java/com/gdschongik/gdsc/global/config/ObjectMapperConfig.java (5 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/main/java/com/gdschongik/gdsc/global/config/ObjectMapperConfig.java

Copy link
Member

@Sangwook02 Sangwook02 left a comment

Choose a reason for hiding this comment

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

lgtm

…into fix/703-add-zoned-date-time-to-objectmapper
Copy link

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

@seulgi99 seulgi99 merged commit 9f5404a into develop Aug 29, 2024
1 check passed
@seulgi99 seulgi99 deleted the fix/703-add-zoned-date-time-to-objectmapper branch August 29, 2024 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug/error 버그 및 에러 픽스
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 ZonedDateTime ObjectMapper가 인식하도록 수정
4 participants