- classpath对应的路径
- web.xml配置文件全部内容
- 后续
classpath指向的是WEB-INF的classes文件,对应的路径是F:Eclipse-Workspace.metadata.pluginsorg.eclipse.wst.server.coretmp1wtpwebappsSealManagementWEB-INFclasses。
applicationContext-web.xml在工程中的位置,如下图所示。
所以web.xml文件中的contextConfigLocation设定的路径应为classpath:spring/applicationContext*.xml,且要写在DispatcherServlet中如下图所示。
springDispatcherServlet org.springframework.web.servlet.DispatcherServlet contextConfigLocation classpath:spring/applicationContext*.xml 1
控制台输出的路径,如下图所示。
配置文件全文如下所示。
后续SealManagement org.springframework.web.context.ContextLoader springDispatcherServlet org.springframework.web.servlet.DispatcherServlet contextConfigLocation classpath:spring/applicationContext*.xml 1 springDispatcherServlet / view/index.jsp
补入此篇博客
有一种说法是:classpath指的是WEB-INF下的classes文件,详见这篇博客



