본문 바로가기

오류해결

No mapping found for HTTP request With URI [/] in DispatcherServlet

 

 

XML 형식의 환경설정을 이용할 때는 web.xml, root-contxt.xml, servlet-context.xml을 자동적으로 잡아주는 틀이 있지만,

Spring JAVA 환경 설정을 할 때는 직접 잡게 된다. 따라서 위의 오류가 뜰 경우 확인해야 할 곳은

1. WebApplicationInitializer 구현체 소스에 주소 오류가 없는지 확인

2.WebMvcConfigurerAdapter 구현체 소스에 주소 오류가 없는지 확인(@ComponentScan, viewResolver 등)

3.Controller의 맵핑 주소 및 패키지 주소 확인