由于Tomcat启动的时候是读取web.xml文件的所以只要在web.xml文件配置即可
<web-app>
<display-name>Archetype Created Web Application</display-name>
<!--
在服务器启动的时候,会找[/WEB-INF/myweb-servlet.xml]文件
在DispatcherServlet的init函数中,会创建SpringMVC的容器对象WebApplicationContext,
在创建容器对象时,会读取SpringMVC需要的配置文件,默认查找为/WEB/<serlvet-name>-servlet.xml
-->
<!--注册SpringMVC核心对象DispatcherServlet(中央调度器)-->