WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/smaple/hello] in DispatcherServlet with name 'appServlet'
home에 있는 기본화면은 뜨는데... 새로 만든 컨트롤러로 요청을 보내니 콘솔에 위 경고가 뜨며 404에러를 발생시켰다.
해결법은 https://stufeel.tistory.com/8 여기서 찾았는데, 바로 servlet-context.xml 파일에 component-scan 설정이다.
servlet-context에서는 controller annotation만 등록하고 나머지(service, repository, component 등)는 spring bean으로 등록하지 않는다! 나는 컨트롤러를 등록하지 않아서 오류가 난것..