원인
- Controller에서 API를 정의할 때 서로 메소드 명은 다르지만 같은 HTTP 메소드와 URL을 가지고 있는 API들이 존재했던 것이 원인
해결 방법
- 서로 HTTP 메소드와 URL이 겹쳤던 메소드 중에 하나를 삭제하니 해결됨
Ex
@RestController
@RequestMapping("/api")
public class ShopController {
@GetMapping("/a")
public void buy {
....
}
@GetMapping("/a")
public void purchase {
....
}
}
'Spring > TroubleShooting' 카테고리의 다른 글
java.lang.IllegalArgumentException: Cannot generate variable name for non-typed Collection parameter type (0) | 2024.04.11 |
---|---|
@Pathvariable 슬래시(/) 처리 방법 (0) | 2024.03.12 |
Sqlite LocalDateTime 적용 문제 (0) | 2024.02.19 |
SSLHandshakeException: PKIX ~ 인증서 관련 에러 (0) | 2024.02.15 |
Bean 수동 주입 방법 (@Autowired로 빈 주입 실패 시) (0) | 2024.01.04 |
댓글