Skip to content

Develop (2차 MVP)#63

Merged
HD152521 merged 16 commits intomainfrom
develop
Mar 4, 2026
Merged

Develop (2차 MVP)#63
HD152521 merged 16 commits intomainfrom
develop

Conversation

@HD152521
Copy link
Copy Markdown
Owner

@HD152521 HD152521 commented Mar 4, 2026

No description provided.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, 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!

This pull request significantly refactors and enhances the application's backend, focusing on improving error handling, API documentation, and monitoring capabilities. It introduces a more structured approach to exceptions, integrates Swagger for better API clarity, and prepares the application for advanced monitoring. Additionally, it refines core business logic in member, agency, school, and file management, while also making targeted improvements to the frontend's error feedback and dynamic content rendering.

Highlights

  • Structured Error Handling: Introduced custom exception handlers and specific error status enums for Agency, File, Member, School, and Student modules, replacing generic BaseException usage for more precise error management.
  • Enhanced API Documentation: Integrated Swagger/OpenAPI annotations across various REST controllers (Agency, File, Member, School, Student, Survey) to provide clear and comprehensive API documentation.
  • Monitoring Capabilities: Added Spring Boot Actuator and Micrometer Prometheus dependencies, and configured security to permit Actuator endpoints, laying the groundwork for application monitoring.
  • School Management Improvements: Implemented new functionality for editing school information, including UI updates and validation for duplicate English names, and refined intro board management.
  • Refined Member & Agency Logic: Updated member and agency services to use the new custom exception handlers and improved the logic for managing agency sharing status based on member approval.
  • File Service Robustness: Strengthened the FileService with detailed error handling for various file operations, ensuring more reliable file uploads, saves, and deletions.
  • Frontend Error Feedback & Survey Question Rendering: Removed generic client-side alert messages for errors in several HTML templates, and refactored JavaScript for more modular and robust rendering of survey questions and templates.

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

Changelog
  • .gitignore
    • Added 'logback-spring.xml' and 'docker-compose.yml' to ignored files.
  • build.gradle
    • Added 'spring-boot-starter-actuator' and 'micrometer-registry-prometheus' dependencies.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/agency/controller/homepage/AgencyRestController.java
    • Added '@operation' annotation to 'getRegionList' method for API documentation.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/agency/controller/homepage/AgengyController.java
    • Added '@operation' annotation to 'agencyList' method for API documentation.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/agency/exception/AgencyHandler.java
    • Added new custom exception handler for agency-related errors.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/agency/exception/status/AgencyErrorStatus.java
    • Added new enum for specific agency error statuses.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/agency/model/Agency.java
    • Modified 'setShare' method to accept a boolean parameter.
    • Added 'updateInfo' method to update school details.
    • Added 'hasIntroBoard' method to check for existing intro board.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/agency/repository/AgencyRepository.java
    • Added 'findAgencyByAgencyNameAndAgencyEmail' method.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/file/controller/FileRestController.java
    • Added '@operation' annotations to file endpoints for API documentation.
    • Removed old comments from file endpoints.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/file/exception/FileHandler.java
    • Added new custom exception handler for file-related errors.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/file/exception/status/FileErrorStatus.java
    • Added new enum for specific file error statuses.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/file/service/FileService.java
    • Refactored error handling to use 'FileHandler' and 'FileErrorStatus'.
    • Improved file path resolution logic.
    • Added 'uploadObject' helper method for file uploads.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/home/controller/HomeController.java
    • Added a log statement to the home controller.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/member/controller/adminpage/MemberAdminRestController.java
    • Added '@operation' annotations to admin member endpoints for API documentation.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/member/controller/homepage/MemberAddressController.java
    • Added '@operation' annotation to 'suggest' method for API documentation.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/member/controller/homepage/MemberProfileRestController.java
    • Added '@operation' annotations to profile update endpoints for API documentation.
    • Corrected method name from 'updateBussinessCert' to 'updateBusinessCert'.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/member/controller/homepage/MemberRestController.java
    • Added '@operation' annotations to member authentication endpoints for API documentation.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/member/exception/MemberHandler.java
    • Added new custom exception handler for member-related errors.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/member/exception/status/MemberErrorStatus.java
    • Added new enum for specific member error statuses.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/member/repository/MemberRepository.java
    • Added 'existsByAgencyAndStatus' method to check for approved members in an agency.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/member/service/MemberDetailsService.java
    • Updated exception handling to use 'MemberHandler'.
    • Added checks for null/blank username and member acceptance status during loading.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/member/service/MemberService.java
    • Refactored exception handling to use 'MemberHandler' and 'AgencyHandler'.
    • Updated 'checkAgency' and 'makeAgency' logic.
    • Refined 'acceptedMember' and 'pendingMember' methods to manage agency sharing status based on approved members.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/member/service/ProfileService.java
    • Refactored exception handling to use 'MemberHandler' and 'FileHandler'.
    • Added member acceptance check before profile updates.
    • Improved file deletion logic for business certificates.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/school/controller/adminpage/SchoolAdminRestController.java
    • Added '@operation' and '@tag' annotations for API documentation.
    • Added a new 'editSchool' endpoint for updating school information.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/school/dto/SchoolRequest.java
    • Added 'SchoolEditDto' record for school editing requests.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/school/exception/SchoolHandler.java
    • Added new custom exception handler for school-related errors.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/school/exception/status/SchoolErrorStatus.java
    • Added new enum for specific school error statuses.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/school/model/School.java
    • Added 'updateInfo' method for school details.
    • Added 'hasIntroBoard' method to check for existing intro board.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/school/repository/SchoolRepository.java
    • Added 'existsBySchoolEnglishName' and 'existsBySchoolEnglishNameAndIdNot' methods for uniqueness checks.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/school/service/SchoolFindService.java
    • Refactored exception handling to use 'SchoolHandler' and 'BaseException' with specific error codes.
    • Added '@transactional(readOnly = true)' to several read methods.
    • Introduced 'requireNonNull' helper method for null checks.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/school/service/SchoolService.java
    • Added 'editSchool' method with duplicate English name validation.
    • Updated 'saveBoard' and 'saveIntro' with new exception handling and intro board existence checks.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/student/controller/adminpage/StudentAdminRestController.java
  • src/main/java/com/cooperation/project/cooperationcenter/domain/student/exception/StudentHandler.java
    • Added new custom exception handler for student-related errors.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/student/exception/status/StudentErrorStatus.java
    • Added new enum for specific student error statuses.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/student/service/StudentService.java
    • Refactored exception handling to use 'StudentHandler' and 'BaseException'.
    • Added checks for empty survey answers and missing survey logs.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/survey/controller/homepage/SurveyRestController.java
    • Added '@operation' annotations to survey endpoints for API documentation.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/survey/service/homepage/SurveyAnswerService.java
    • Updated exception handling to use 'MemberHandler'.
  • src/main/java/com/cooperation/project/cooperationcenter/domain/survey/service/homepage/SurveyFindService.java
    • Refactored exception handling to use 'BaseException' with specific error codes.
    • Added 'requireNonNull' helper method for null checks.
  • src/main/java/com/cooperation/project/cooperationcenter/global/config/SecurityConfig.java
    • Permitted access to '/actuator' endpoints.
  • src/main/java/com/cooperation/project/cooperationcenter/global/exception/GlobalExceptionHandler.java
    • Commented out the entire class, indicating a shift to more localized exception handling.
  • src/main/java/com/cooperation/project/cooperationcenter/global/exception/codes/ErrorCode.java
    • Removed member and login-related error codes, as they are now handled by specific exception enums.
  • src/main/java/com/cooperation/project/cooperationcenter/global/filter/AuthenticationTokenFilter.java
    • Added '/actuator' to ignored paths for authentication.
  • src/main/java/com/cooperation/project/cooperationcenter/global/filter/CustomAuthenticationEntryPoint.java
    • Added logging for authentication path.
  • src/main/java/com/cooperation/project/cooperationcenter/global/filter/GlobalModelAttributeAdvice.java
    • Updated exception handling to use 'MemberHandler'.
    • Corrected method name 'loadSchoolCatogory' to 'loadSchoolCategory'.
    • Added logging for school lookup.
  • src/main/resources/logback-spring.xml
    • Added new Logback configuration file for console logging.
  • src/main/resources/static/js/css/output.css
    • Updated CSS file with new utility classes.
  • src/main/resources/templates/adminpage/user/school/manageSchool.html
    • Added a new modal for editing school information.
    • Updated JavaScript functions for modal handling.
    • Changed department input from a single-line input to a multi-line textarea with improved parsing.
  • src/main/resources/templates/fragments/layout/university-layout.html
    • Changed 'th:replace' to 'th:block th:replace' for 'univScript' to ensure proper Thymeleaf processing.
  • src/main/resources/templates/fragments/school/admin/board-list.html
    • Added an 'Edit' button for school information with an 'onclick' event to open a modal.
  • src/main/resources/templates/fragments/school/admin/intro-editor.html
    • Added 'Save' buttons to various sections of the intro editor, each calling 'saveIntroSection' for targeted saving.
  • src/main/resources/templates/fragments/school/admin/modals.html
    • Added a new modal for editing school information with fields for Korean name, English name, and image URL.
  • src/main/resources/templates/homepage/user/forgetPassword.html
    • Removed client-side 'alert()' for server communication errors.
  • src/main/resources/templates/homepage/user/login.html
    • Removed client-side 'showModal()' for login failures.
  • src/main/resources/templates/homepage/user/resetPassword.html
    • Removed client-side 'alert()' for server communication errors.
  • src/main/resources/templates/homepage/user/school/school-schedule.html
    • Added 'meta name="turbo-visit-control" content="reload"' to force page reload for schedule page.
  • src/main/resources/templates/homepage/user/signup.html
    • Removed client-side error modal for signup failures.
  • src/main/resources/templates/homepage/user/survey/survey-answer-log.html
    • Removed client-side 'alert()' calls for CSV download and file download errors.
  • src/main/resources/templates/homepage/user/survey/survey-answer.html
    • Removed client-side 'alert()' for survey submission errors.
  • src/main/resources/templates/homepage/user/survey/survey-make.html
    • Refactored JavaScript for rendering existing questions and template questions, introducing helper functions for normalization, meta-setting, content application, and option handling.
Activity
  • This pull request is part of the '2차 MVP' (Second Minimum Viable Product) development phase, indicating a significant set of features and improvements.
  • The changes involve extensive refactoring of exception handling to be more specific and robust across multiple domains.
  • API documentation has been systematically added or enhanced using Swagger annotations, improving clarity for developers.
  • New monitoring tools (Actuator, Prometheus) have been integrated, suggesting a focus on operational visibility.
  • Frontend logic for displaying errors has been streamlined by removing direct alert calls, likely in favor of more integrated UI feedback mechanisms.
  • JavaScript code for dynamic content rendering, particularly in survey creation, has been modularized and improved.
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
Copy Markdown

@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은 전반적으로 코드 품질을 크게 향상시켰습니다. 특히 try-catch-null 패턴을 도메인별 커스텀 예외로 대체하여 오류 처리 방식을 개선한 점이 인상적입니다. 이를 통해 서비스의 안정성과 유지보수성이 크게 향상되었습니다. FileServiceSurveyFindService의 리팩토링은 특히 훌륭합니다. 또한, 다수의 컨트롤러에 Swagger 어노테이션을 추가하여 API 문서화를 개선했습니다. 프론트엔드에서도 설문 생성 페이지의 코드 리팩토링 등 여러 UX 개선이 이루어졌습니다.

다만, 몇 가지 중요한 점검이 필요합니다. 전역 예외 처리기가 주석 처리되어 있어 오류 응답의 일관성이 깨질 수 있습니다. 또한, 일부 UI와 API 문서에서 문자 인코딩 문제가 발견되었습니다. 마지막으로, 프론트엔드에서 사용자에게 오류를 알려주던 알림 기능이 제거되어 사용자 경험이 저하될 수 있습니다.

Note: Security Review did not run due to the size of the PR.

I am having trouble creating individual review comments. Click here to see my feedback.

src/main/java/com/cooperation/project/cooperationcenter/global/exception/GlobalExceptionHandler.java (1-32)

critical

GlobalExceptionHandler 클래스 전체가 주석 처리되었습니다. 이는 전역 예외 처리 메커니즘을 비활성화하는 심각한 문제입니다. 이 핸들러가 없으면 다른 곳에서 처리되지 않은 예외가 표준 BaseResponse 형식으로 변환되지 않아, 일관성 없는 오류 응답(예: 기본 Spring 오류 페이지)을 반환하게 되어 API 클라이언트 경험을 저해할 수 있습니다. 모든 예외를 일관되게 처리할 수 있도록 이 클래스의 주석을 해제해야 합니다.

src/main/java/com/cooperation/project/cooperationcenter/domain/school/controller/adminpage/SchoolAdminRestController.java (49-52)

medium

@Operationsummary에 문자 인코딩 문제로 인해 깨진 텍스트(?숆탳 ?뺣낫 ?섏젙)가 포함되어 있습니다. 이로 인해 Swagger UI에서 API 설명이 올바르게 표시되지 않습니다. "학교 정보 수정"으로 수정하고, 파일 인코딩을 확인해 주세요.

            summary = "학교 정보 수정",
            description = """
        학교 기본 정보(국문/영문명, 로고 URL)를 수정합니다.
        """

src/main/resources/templates/fragments/school/admin/board-list.html (65)

medium

버튼의 텍스트가 깨져서(?섏젙) 보입니다. HTML 파일의 문자 인코딩 문제로 보입니다. 의도한 텍스트는 "수정"일 것입니다. 파일이 올바른 인코딩(예: UTF-8)으로 저장되었는지 확인하고 텍스트를 수정해 주세요.

                                수정

src/main/resources/templates/homepage/user/login.html (144-149)

medium

로그인 실패 시 사용자에게 모달을 통해 오류를 알려주던 로직이 제거되었습니다. 현재는 콘솔에만 오류가 기록되어 사용자에게 아무런 피드백이 제공되지 않습니다. 이는 사용자 경험을 저하시킬 수 있습니다. alert()는 지양하는 것이 좋지만, 모든 피드백을 제거하는 것은 바람직하지 않습니다. 토스트 메시지나 폼 내 메시지 영역과 같은 일관되고 방해되지 않는 알림 시스템을 구현하여 사용자에게 오류 상황을 알려주는 것을 권장합니다. 이 문제는 오류 알림이 제거된 signup.html, forgetPassword.html 등 다른 페이지에도 동일하게 적용됩니다.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9c0047866b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +11 to +13
//@RestControllerAdvice
//@Slf4j
//public class GlobalExceptionHandler {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reinstate global BaseException advice

The entire GlobalExceptionHandler has been commented out, so BaseException subclasses (including the newly introduced domain handlers) are no longer translated into their intended HTTP status/code payloads. As a result, business errors from controllers that do not manually catch exceptions (for example school admin APIs) now fall through to generic error handling and return internal-server-style responses instead of the structured BaseResponse clients expect.

Useful? React with 👍 / 👎.

Comment on lines +187 to +189
return filePostRepository.findTopBySchoolBoardAndIdLessThanOrderByIdDesc(board,postId).orElseThrow(
() -> new SchoolHandler(SchoolErrorStatus.FILE_POST_NOT_FOUND)
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Allow missing adjacent file posts in detail view

This lookup now throws when there is no previous file post, but getDetailFilePostDto still treats adjacent posts as optional and builds a response that supports null neighbors. For the first or last file post in a board, one side is naturally absent, so the detail API now fails with FILE_POST_NOT_FOUND instead of returning the post detail with a null prev/next link.

Useful? React with 👍 / 👎.

@HD152521 HD152521 merged commit 5509c3e into main Mar 4, 2026
2 checks passed
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.

1 participant