Skip to content

Conversation

@ochanhyeok
Copy link
Contributor

@ochanhyeok ochanhyeok commented Oct 30, 2025

Summary by CodeRabbit

릴리스 노트

  • 개선 사항
    • API 응답 처리 방식을 개선하여 JSON 형식의 직접 응답을 지원하도록 업데이트했습니다.

@coderabbitai
Copy link

coderabbitai bot commented Oct 30, 2025

Walkthrough

두 개의 Spring MVC 컨트롤러 클래스에서 @controller 어노테이션을 @RestController로 변경했습니다. 이 변경은 뷰 렌더링 기반 접근에서 RESTful JSON 응답 기반 접근으로 전환됩니다. 메서드 시그니처와 라우팅 로직은 유지됩니다.

Changes

소속 / 파일 변경 요약
컨트롤러 어노테이션 변경
backend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceController.java, backend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceSessionController.java
@controller에서 @RestController로 변경. RESTful JSON 응답 방식으로 전환. AttendanceSessionController에서 미사용 Controller import 제거

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • 간단한 어노테이션 변경으로, 논리적 변화 없음
  • 반복적인 패턴 (두 파일에서 동일한 변경)
  • 메서드 시그니처 및 제어 흐름 유지

Suggested reviewers

  • discipline24

Poem

🐰 컨트롤러가 REST로 거듭나니,
JSON의 춤을 춤을 추네!
뷰는 안녕, 응답은 환영,
두 칸의 변화가 API를 살리고,
간결함 속에 우아함이 피어나네! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed PR 제목 "[BE] SISC1 [FIX] Change @controller to @RestController for Swagger"는 실제 변경 사항과 정확하게 연관되어 있습니다. 코드 변경의 핵심은 두 개의 컨트롤러 클래스(AttendanceController와 AttendanceSessionController)에서 @controller 어노테이션을 @RestController로 변경하는 것이며, 이는 제목에 명확하게 반영되어 있습니다. 제목은 간결하고 구체적이어서 개발자들이 변경 이력을 훑어볼 때 주요 변경 사항을 쉽게 이해할 수 있습니다. "for Swagger"는 변경의 동기나 목적을 설명하는 문맥적 정보로 해석되며, 실제 코드 변경 내용을 정확하게 반영합니다.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/controller-annotation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

🧹 Nitpick comments (1)
backend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceController.java (1)

29-30: 주석의 오타를 수정하세요.

주석에 몇 가지 오타가 있습니다:

  • "이요한" → "이용한"
  • "춣석" → "출석"
  • "위도우" → "윈도우"

다음 diff를 적용하여 오타를 수정하세요:

     /**
      * 학생 출석 체크인
-     * - 출석 코드와 GPS 위치를 이요한 춣석 처리
-     * - 위치 범위, 시간 위도우 검증 포함
+     * - 출석 코드와 GPS 위치를 이용한 출석 처리
+     * - 위치 범위, 시간 윈도우 검증 포함
      * - 중복 출석 방지
      */
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 68be900 and c45a2e5.

📒 Files selected for processing (2)
  • backend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceController.java (1 hunks)
  • backend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceSessionController.java (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
backend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceController.java (1)
backend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceSessionController.java (1)
  • RestController (18-211)
backend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceSessionController.java (1)
backend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceController.java (1)
  • RestController (19-100)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Backend Gate
🔇 Additional comments (2)
backend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceController.java (1)

19-19: @RestController 변경이 적절합니다!

@Controller에서 @RestController로의 변경이 올바릅니다. 모든 메서드가 ResponseEntity를 반환하므로 RESTful API 패턴과 일치하며, Swagger 문서화도 개선됩니다.

backend/src/main/java/org/sejongisc/backend/attendance/controller/AttendanceSessionController.java (1)

18-18: @RestController 변경이 완벽합니다!

@RestController로의 변경이 적절하며, AttendanceController와 일관성을 유지합니다. 모든 엔드포인트가 ResponseEntity를 반환하므로 REST API 설계와 완벽하게 일치하며, PR 목표대로 Swagger 문서화가 개선됩니다.

Copy link
Contributor

@discipline24 discipline24 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다

@discipline24 discipline24 merged commit f1b582e into main Nov 2, 2025
1 check passed
@discipline24 discipline24 deleted the fix/controller-annotation branch November 2, 2025 05:57
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