applicationContext.xml xxx-servlet.xml

applicationContext.xml是随ContextLoaderListener的加载而执行的,而xxx-servlet.xml是随DispatcherServlet的加载而执行的,在web.xml中,加载顺序是listener>filter>servlet,所以applicationContext.xml先加载!

原文地址:https://www.cnblogs.com/Struts-pring/p/5044969.html