Skip to content

fix: actuator/health 메인 포트 404 응답 수정#424

Merged
pooreumjung merged 1 commit into
developfrom
fix/#423-expose-actuator-health-main-port
Jul 19, 2026
Merged

fix: actuator/health 메인 포트 404 응답 수정#424
pooreumjung merged 1 commit into
developfrom
fix/#423-expose-actuator-health-main-port

Conversation

@pooreumjung

@pooreumjung pooreumjung commented Jul 19, 2026

Copy link
Copy Markdown
Member

#️⃣ Issue Number

📝 요약(Summary)

  • dev/prod 공개 도메인에서 GET /actuator/health 요청 시 404가 발생하는 문제를 수정
  • 원인: management.server.port: 9001 설정으로 actuator가 메인 서버(9000)와 분리된 별도 관리 포트에서 서빙되고 있고, Docker 컨테이너에서도 9001은 127.0.0.1에만 바인딩되어 있어 공개 도메인(9000)으로는 /actuator/** 경로 자체가 존재하지 않음
  • management.endpoint.health.additional-path 설정으로 해결하려 했으나 해당 기능은 Spring Boot 3.1+ 전용이며 본 프로젝트는 3.0.4를 사용 중이라 적용되지 않아, 대신 global/handler/HealthCheckController를 신규 추가해 메인 서버 포트(9000)에서 GET /actuator/health{"status":"UP"}을 응답하도록 함
  • 9001 관리 포트의 실제 actuator(/actuator/prometheus, /actuator/metrics)는 그대로 유지되어 Grafana Cloud 모니터링 연동에는 영향 없음
  • SecurityConfig/JwtAuthenticationFilter의 화이트리스트에는 이미 /actuator/health가 등록되어 있어 별도 보안 설정 변경없음

💬 공유사항 to 리뷰어

✅ PR Checklist

PR이 다음 요구 사항을 충족하는지 확인하세요.

  • 커밋 메시지 컨벤션에 맞게 작성했습니다.
  • 변경 사항에 대한 테스트를 했습니다.(버그 수정/기능에 대한 테스트).

@pooreumjung pooreumjung added the fix 고치기 label Jul 19, 2026
@pooreumjung pooreumjung self-assigned this Jul 19, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

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!

본 PR은 메인 서버 포트에서 /actuator/health 엔드포인트가 404를 반환하는 문제를 해결합니다. Spring Boot 버전 제약으로 인해 관리 포트와 메인 포트가 분리되어 발생하는 접근성 문제를, 별도의 경량 컨트롤러를 도입하여 메인 포트에서도 상태 확인이 가능하도록 조치했습니다.

Highlights

  • 404 에러 해결: 공개 도메인에서 /actuator/health 요청 시 발생하는 404 문제를 해결하기 위해 메인 포트에서 응답하는 컨트롤러를 추가했습니다.
  • HealthCheckController 신규 추가: Spring Boot 3.0.4 환경의 제약으로 인해, 메인 서버 포트(9000)에서 /actuator/health 경로로 요청 시 {
  • 모니터링 유지: 기존 9001 관리 포트의 Actuator 엔드포인트는 그대로 유지하여 Grafana Cloud 모니터링 연동에 영향을 주지 않도록 했습니다.
New Features

🧠 You can now enable Memory (public preview) 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 the 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 counterproductive. 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.


포트가 달라 헤매던 길, 메인 서버에 길을 텄네. UP이라는 짧은 응답, 이제는 안심하고 통과하네.

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.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

이번 풀 리퀘스트에서는 애플리케이션의 상태를 확인하기 위한 /actuator/health 엔드포인트를 제공하는 HealthCheckController를 새롭게 추가하였습니다. 이에 대해 리뷰어는 매번 새로운 Map 인스턴스를 생성하는 대신 private static final 상수로 재사용하여 메모리 효율성을 높일 것을 제안하였으며, 임시 코드인 만큼 저장소 스타일 가이드에 맞춰 작성자 이름과 날짜가 포함된 FIXME 주석을 추가할 것을 권장했습니다.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +8 to +13
public class HealthCheckController {

@GetMapping("/actuator/health")
public Map<String, String> health() {
return Map.of("status", "UP");
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

매번 새로운 Map 인스턴스를 생성하는 대신 private static final 상수로 선언하여 재사용하면 메모리 효율성을 높이고 GC 부하를 줄일 수 있습니다.

public class HealthCheckController {

    private static final Map<String, String> HEALTH_STATUS = Map.of("status", "UP");

    @GetMapping("/actuator/health")
    public Map<String, String> health() {
        return HEALTH_STATUS;
    }

Comment thread src/main/java/ssu/eatssu/global/handler/HealthCheckController.java
@pooreumjung
pooreumjung merged commit fae0c20 into develop Jul 19, 2026
1 check passed
@pooreumjung
pooreumjung deleted the fix/#423-expose-actuator-health-main-port branch July 19, 2026 08:30
pooreumjung added a commit that referenced this pull request Jul 19, 2026
…main-port

fix: actuator/health 메인 포트 404 응답 수정
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 고치기

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: dev/운영 actuator/health 엔드포인트 404 응답 수정

1 participant