Skip to content

Conversation

@yongjun0511
Copy link
Collaborator

No description provided.

JjungminLee and others added 20 commits September 23, 2025 21:49
* fix: statistics 공통 메뉴 나오는 문제 해결

* fix: list api 공통 메뉴 안나오게 수정

* feat: /v2/review/meals에서 mealID 추출 시 valid menu만 추출하게끔 변경

* feat: 내리뷰 조회 api dto id,name 형태로 변경

* feat: list dto에 id,name,like / statistics dto에 id, name추가

* refactor: gemini 리뷰 반영 및 menuNames -> menuList로 수정
* feat: 자장밥 필터링 안되게 추가

* refactor: /v2/reviews/my swagger json 깨지는 문제 수정

* refactor: valid-for-review swagger menulist 수정

* refactor: /list/menu mainRating->rating, 맛/양 rating 필드 삭제

* chore: 코드 포맷팅

* refactor: mainRating->rating으로 필드 변경

* /list/menu에 id,name,isLike추가

* fix: gemini 리뷰 반영
* chore: DS 파일 git ignore

* refactor: 만료된 제휴가 보이지 않도록 수정

* feat: 24시간 이내에 댓글 신고 횟수 제한

* refactor: 스웨거 문서 업데이트

* chore: CI/CD test

* chore: CI/CD test

* fix: 공백 제거

* fix: CI/CD 수정 완료

* fix: gemini 수정 사항 반영

* fix: writtenAt 필드 수정

---------

Co-authored-by: 나용준 <[email protected]>
@yongjun0511 yongjun0511 self-assigned this Sep 30, 2025
@gemini-code-assist
Copy link

Summary of Changes

Hello @yongjun0511, 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은 애플리케이션의 로깅 기능을 강화하고, 리뷰 시스템의 데이터 표현 및 로직을 개선하며, v2.0.8 릴리즈를 위한 전반적인 유지보수 작업을 포함합니다. 로깅 개선은 컨트롤러에 대한 구조화된 요청/응답 로깅과 주요 서비스 작업에 대한 이벤트 기반 로깅을 도입하며, 민감한 데이터 마스킹 기능을 제공합니다. 리뷰 시스템은 이제 응답에서 더 세분화된 메뉴 세부 정보를 제공하고, 잦은 중복 신고를 방지하는 메커니즘을 포함합니다. 또한, 사소한 빌드 및 구성 조정도 이 릴리즈의 일부입니다.

Highlights

  • 로깅 시스템 개선: 컨트롤러 요청/응답에 대한 AOP 기반 로깅과 서비스 계층의 주요 작업에 대한 이벤트 기반 로깅을 도입했습니다. 민감한 정보는 LogMask 어노테이션을 통해 마스킹 처리됩니다.
  • 리뷰 시스템 기능 및 데이터 구조 개선: 식단 및 메뉴 리뷰 응답에서 메뉴 정보를 ID, 이름, 좋아요 여부를 포함하는 상세 객체로 변경하여 더 풍부한 정보를 제공합니다. 또한, 24시간 이내 동일 리뷰에 대한 중복 신고를 방지하는 로직이 추가되었습니다.
  • 빌드 및 설정 업데이트: build.gradle-parameters 컴파일러 인자를 추가하여 런타임에 매개변수 이름을 유지하도록 했으며, 로깅 설정을 위한 logback-spring.xml 파일이 추가되고 application-local.yml이 삭제되었습니다. .DS_Store 파일이 .gitignore에 추가되었습니다.
  • 코드 정리 및 리팩토링: 여러 파일에서 사용되지 않는 임포트가 제거되고, 코드 포맷이 정리되었으며, CollegeDepartment 엔티티의 필드 순서가 조정되었습니다.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/deploy.yml
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.

Copy link

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

Choose a reason for hiding this comment

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

Code Review

이번 PR은 로깅 및 API 응답 구조를 중심으로 많은 개선이 이루어졌습니다. AOP, MDC, 비동기 이벤트를 활용한 포괄적인 로깅 시스템이 추가되어 추적성과 디버깅이 크게 향상될 것입니다. 로그에 포함된 민감한 정보는 이제 마스킹 처리됩니다. API 응답은 더 구조화된 데이터(예: 문자열 목록 대신 MenuIdNameLikeDto 사용)를 제공하도록 리팩토링되어 클라이언트 측 개발에 큰 이점이 될 것입니다. 또한 여러 서비스에서 생성, 수정, 삭제와 같은 주요 작업에 대한 이벤트 기반 로깅이 추가되었습니다. 이 외에도 메뉴 필터링 개선, 리뷰 신고 스팸 방지 기능 추가 등 버그 수정 및 로직 개선도 포함되어 있습니다. 전반적으로 애플리케이션의 안정성과 유지보수성을 크게 향상시키는 수준 높은 기여입니다. 몇 가지 사소한 개선 및 스타일 가이드 준수에 대한 제안 사항이 있습니다.

Comment on lines +42 to +44
List<Menu> menus = meal.getMealMenus().stream()
.map(MealMenu::getMenu)
.toList();

Choose a reason for hiding this comment

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

medium

Meal 엔티티에 getMenus() 메서드가 새로 추가되었으므로, 이 코드를 List<Menu> menus = meal.getMenus();로 단순화할 수 있습니다. 이렇게 하면 중복 코드를 줄이고 가독성을 높일 수 있습니다.

        List<Menu> menus = meal.getMenus();

import static ssu.eatssu.global.handler.response.BaseResponseStatus.NOT_FOUND_USER;
import java.time.LocalDateTime;

import static ssu.eatssu.global.handler.response.BaseResponseStatus.*;

Choose a reason for hiding this comment

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

medium

스타일 가이드 3번 항목('라이브러리를 가져올 때 와일드카드를 사용하지 마십시오')에 따라 와일드카드(*)를 사용한 import를 피해야 합니다. 필요한 클래스들을 명시적으로 import하는 것이 좋습니다.1

Suggested change
import static ssu.eatssu.global.handler.response.BaseResponseStatus.*;
import static ssu.eatssu.global.handler.response.BaseResponseStatus.NOT_FOUND_REVIEW;
import static ssu.eatssu.global.handler.response.BaseResponseStatus.NOT_FOUND_USER;
import static ssu.eatssu.global.handler.response.BaseResponseStatus.RECENT_REPORT_ON_REVIEW;

Style Guide References

Footnotes

  1. 스타일 가이드에 따라 와일드카드(*)를 사용한 import는 허용되지 않습니다.

Comment on lines +189 to 192
List<Menu> menus = mealMenuRepository.findMenusByMeal(meal);
if (menus.isEmpty()) {
log.warn("No menus found for mealId={}", mealId);
}

Choose a reason for hiding this comment

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

medium

Meal 엔티티에 새로 추가된 getMenus() 메서드를 사용하여 코드를 단순화할 수 있습니다. List<Menu> menus = meal.getMenus();로 변경하면 mealMenuRepository에 대한 의존성을 줄이고 코드를 더 간결하게 만들 수 있습니다.

Suggested change
List<Menu> menus = mealMenuRepository.findMenusByMeal(meal);
if (menus.isEmpty()) {
log.warn("No menus found for mealId={}", mealId);
}
List<Menu> menus = meal.getMenus();
if (menus.isEmpty()) {
log.warn("No menus found for mealId={}", mealId);
}

Comment on lines +14 to +17
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
public void handleLogEvent(LogEvent event) {
log.info(event.message());
}

Choose a reason for hiding this comment

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

medium

로그 이벤트 처리가 동기적으로 실행되면 요청 처리 시간에 영향을 줄 수 있습니다. @Async 어노테이션을 handleLogEvent 메서드에 추가하여 이벤트를 비동기적으로 처리하는 것을 고려해 보세요. 이렇게 하면 로깅 작업이 주 스레드를 차단하지 않아 애플리케이션의 응답성을 향상시킬 수 있습니다. AsyncConfig가 이미 설정되어 있으므로 어노테이션 추가만으로 비동기 처리가 가능합니다.

    @org.springframework.scheduling.annotation.Async
    @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
    public void handleLogEvent(LogEvent event) {
        log.info(event.message());
    }

Comment on lines +3 to +10
<!-- 색상 출력 지원 -->
<conversionRule conversionWord="clr"
converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

<!-- 로그 형식 설정 예시 :2025-09-25 12:34:56.789 [INFO] [http-nio-9000-ex] [reqId=123e4567] [com.eatssu.api.UserController] - 내용
Thread : 동시성 문제 관련 사용, Request : 요청 단위 -->
<property name="LOG_PATTERN"
value="%d{yyyy-MM-dd HH:mm:ss.SSS} %clr([%level]) [%thread] [reqId=%X{requestId}] %cyan(%logger{36}) - %msg%n"/>

Choose a reason for hiding this comment

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

medium

이 파일에 추가된 XML 주석들은 유용하지만, 스타일 가이드 2번('코드 블록에 주석을 작성하지 마십시오') 및 7번('주석은 가능한 한 한 줄로 작성해야 합니다')에 위배될 수 있습니다. XML 파일이 '코드 블록'에 해당하는지 명확하지 않지만, 가이드를 엄격하게 따른다면 주석을 제거하는 것을 고려해볼 수 있습니다.1

Style Guide References

Footnotes

  1. 스타일 가이드에 따르면 코드 블록 내 주석 작성을 피하고, 주석은 한 줄로 작성해야 합니다. XML 주석이 이에 해당될 수 있습니다.

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.

3 participants