Skip to content

main으로 develop의 최신 변경 내용 머지#42

Merged
hongjm0912 merged 1 commit into
mainfrom
develop
Dec 28, 2025
Merged

main으로 develop의 최신 변경 내용 머지#42
hongjm0912 merged 1 commit into
mainfrom
develop

Conversation

@ZaMan0806

Copy link
Copy Markdown
Collaborator

No description provided.

@ZaMan0806 ZaMan0806 requested a review from hongjm0912 December 28, 2025 12:45
@ZaMan0806 ZaMan0806 self-assigned this Dec 28, 2025
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @ZaMan-O, 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!

이 Pull Request는 develop 브랜치의 최신 변경 사항을 main 브랜치로 병합합니다. 주요 변경 사항은 사용자 프로필 편집 및 회원가입 시 프로필 이미지 필드를 필수가 아닌 선택 사항으로 변경하여, 사용자가 프로필 이미지를 제공하지 않고도 관련 작업을 수행할 수 있도록 유연성을 높인 것입니다.

Highlights

  • 프로필 이미지 필드 선택 사항으로 변경: 사용자 프로필 편집 및 회원가입 요청 DTO에서 profileImage 필드의 @NotNull 제약 조건이 제거되어, 해당 필드가 선택 사항이 되었습니다.

🧠 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.

@hongjm0912 hongjm0912 merged commit ae42055 into main Dec 28, 2025
3 checks passed

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

이 PR은 EditMyPageReqDtoSignupInformReqDto에서 profileImage 필드를 선택적으로 만들고 있습니다. SignupInformReqDto의 변경 사항은 회원가입 정보 입력 시 유연성을 더해주는 좋은 개선입니다. 하지만 EditMyPageReqDto의 변경은 현재 PATCH API 구현 방식과 맞물려 의도치 않게 사용자의 프로필 이미지를 삭제할 수 있는 잠재적인 문제를 가지고 있습니다. 이와 관련된 자세한 내용과 해결 방안을 리뷰 댓글로 남겼습니다.

@NotNull String major,
@NotNull String introduce,
@NotNull String profileImage
String profileImage

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

프로필 이미지를 선택적 필드로 변경하면서 @NotNull 어노테이션을 제거한 것은 좋지만, 이로 인해 PATCH 요청 처리 시 데이터가 의도치 않게 손실될 위험이 있습니다.

현재 MyPageControllereditMyPage 엔드포인트는 @PatchMapping을 사용하지만, 서비스 로직은 DTO의 모든 필드로 사용자 정보를 덮어쓰고 있습니다. 이 때문에 클라이언트가 다른 정보만 수정하면서 profileImage 필드를 생략하면, 해당 필드가 null로 처리되어 기존 프로필 이미지가 삭제됩니다.

이를 방지하려면 서비스 레이어에서 null 값을 확인하고 선택적으로 필드를 업데이트해야 합니다. 예를 들어, profileImagenull이면 기존 값을 유지하도록 할 수 있습니다.

수정 제안 예시 (EditMyPageService):

// ...
UserJpaEntity user = // ...

String finalProfileImage = reqDto.profileImage();
if (finalProfileImage == null) {
    // profileImage가 요청에 포함되지 않은 경우, 기존 값을 유지합니다.
    // 이렇게 하면 다른 필드를 업데이트할 때 이미지가 삭제되는 것을 방지할 수 있습니다.
    finalProfileImage = user.getProfileImage();
}

// user.updateUserInformation(...) 호출 시 finalProfileImage 사용
// ...

이러한 접근 방식은 이미지 삭제를 어떻게 처리할지에 대한 추가적인 고려가 필요합니다 (예: 빈 문자열을 삭제 신호로 사용). PATCH의 의미를 더 잘 살리려면 DTO 필드를 Optional로 감싸는 것도 좋은 대안입니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants