메뉴 건너띄기
상단메뉴 바로가기
본문 바로가기

이 누리집은 대한민국 공식 전자정부 누리집입니다.

본문 영역

적용 지원, FAQ, Q&A 게시판을 통해 기술 문제 해결을 지원합니다.

묻고 답하기

No mapping found for HTTP request with URI문제
  • 작성자

    정*랑

  • 작성일

    2013-05-15 09:40:13

  • 조회수

    10,622

  • 구분

    실행환경

  • 진행상태

    완료

질문

INFO : org.thinker.sample.HomeController - Welcome home! The client locale is ko_KR.
2013. 5. 15 오전 9:14:36 org.apache.jasper.compiler.TldLocationsCache tldScanJar
정보: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/day2/member/list.json] in DispatcherServlet with name 'appServlet'
WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/day2/member/list.json] in DispatcherServlet with name 'appServlet'
WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/favicon.ico] in DispatcherServlet with name 'appServlet'

jaon으로 출력되는 부분을 테스트하고 있는데 자꾸 HTTP request with URI 워닝이 뜨면서 값이 안나오는데..도움을 요청드립니다.

첨부파일
답변

안녕하세요. 정우랑님.

3가지 문제의 가능성이 있는 것 같습니다.

우선 /day2 부분 context root로 지정되어 있다고 하면, Controller 상에 @RequestMapping 상에서는 "/day2" 부분이 제외되어야 기술되어야 합니다.

반대로 context root가 아니라면 @RequestMapping 상에 포함되어야 하구요.

이 경우는 로그 상에 마지막 "/favicon.ico"가 호출된 것으로 봐서는 url 상의 "/day2"가 context root가 아닌 일반 경로도 @RequestMapping 상에 포함되어 있는지 확인해 보십시오.

두번쨰 경우는 .json 확장자에 의해 servlet-mapping이 되지 않는 경우인데.. 이 경우라면 appServlet에서 위와 같은 로그를 찍어주지 않기 때문에, 이 문제는 아닌 것 같습니다.

마지막의 경우는 해당 URL이 정의되어 있는 @Controller가 component-scan의 대상이 아니어서 spring bean으로 등록되지 않는 경우입니다.

<context:component-scan /> 상의 base-package 상에 해당 @Controller가 소속되어 있는 패키지가 지정되어 있는지 확인해 보십시오.

그럼, 즐거운 하루되십시오.
감사합니다.

이 페이지의 구성

묻고 답하기