首先在web.xml中配置容器启动监听器,这样在容器启动后Spring会初始化一个ServletContext
SpringMVC的DispatcherServlet加载过程
原文:https://www.cnblogs.com/panning/p/9781790.html