启动tomcat出错。。。ERROR [localhost-startStop-1] - Context initialization failed

 

原因:web.xml文件中没有加载spring 的一系列配置文件ApplicationContext-*.xml

解决:加载spring配置文件

  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:spring/ApplicationContext-*.xml</param-value>
  </context-param>
  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>

相关文章: