异常IOException parsing XML document from class path resource [WEB-INFO/applicationContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [WEB-INFO/applicationContext.xml] cannot be opened because it does not exist为什么找不到applicationContext.xml文件急急急急 

解决方案 »

  1.   

    web.xml 中配置下  classpath:applicationContext.xml
      

  2.   

    这是因为没有在类路径中找到相应的xml文件,首先,你可以讲spring相关的xml文件放置在src下或者某个包下面,
    再在web.xml文件中加入以下参数:
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath*:applicationContext.xml,</param-value>
    </context-param>
    当然,监听一定得加:
    <listener>
    <listener-class>
    org.springframework.web.context.ContextLoaderListener
    </listener-class>
    </listener>
      

  3.   

    楼上两位已经说的很清楚了,就是spring的配置文件要先在web.xml中先配置