🔴 에러 메시지
java.lang.IllegalStateException: Ambiguous handler methods mapped for '/recruit-apply/2'
🧐 발생한 상황
@GetMapping으로 요청 URL 경로를 설정하는 과정에서 발생
💥 원인 분석
두 개의 서로 다른 메소드가 같은 URL 패턴을 공유
public ResponseEntity findAllByRecruitId(int)
public ResponseEntity findAllnByUserId(int)
✅ 해결 방법
요청 URL 경로가 충돌하지 않도록 명확히 분리해서 구분되도록 수정하여 해결!
'개발 기록 > 오류 분석' 카테고리의 다른 글
| [JPA] 오류: N+1 문제 - 연관 엔티티 자동 조회 발생 (0) | 2025.05.17 |
|---|---|
| [Spring Boot] 오류: No 'Access-Control-Allow-Origin' header is present on the requested resource - CORS (0) | 2025.04.26 |