[Error]circular view path [hello]: would dispatch back to the current handler url [test/hello] again. check your view resolver setup! (hint: this may be the result of an unspecified view, due to default view name generation.)

·2023년 10월 8일

Error

목록 보기
4/10

[Error]circular view path [hello]: would dispatch back to the current handler url [test/hello] again. check your view resolver setup! (hint: this may be the result of an unspecified view, due to default view name generation.)

  • /hello를 요청하면 get mapping에서 다시 "hello"을 리턴해서 circular view path error가 발생
  • 이는 기본적으로 spring mvc프레임 워크가 InternalResourceView 클래스를 뷰 리졸버로 적용해서 @GetMapping값이 view와 같은 경우라면 Circular View 경로 오류가 발생하며 요청이 실패한다고 한다.
    출처

✔ 뷰 이름을 요청 url과 다르게 설정해주면 해결

profile
백엔드 개발자가 되고 싶어요(22.8.15~)

0개의 댓글