경로
-
Configuration File 설정Spring-diary/WEB 2020. 2. 12. 10:04
Configuratin File을 다수 설정할 수 있다. 환경설정 하는 Configuration 파일 하나와 Controller를 설정하는 파일 하나로 조정할 수 있다. Web.xml Configuration 파일 위치 설정 Web.xml에서 Configuration 파일의 위치를 설정해 줄때 두개로 잡아준다. Web.xml에 설정한 경로와 이름대로 파일을 만들어준다. namespace MVC이용해 resolver 설정 namespace 설정 Tag 설정 context:component-scan Controller 사용시 일일이 Bean으로 등록해 사용하는 불편함을 줄이는 context:component-scan을 사용한다. 패키지에 있는 controller를 찾아서 자동으로 등록해준다. 대신에 Anno..