zoukankan      html  css  js  c++  java
  • spring mvc 解决 Could not open ServletContext resource [/WEB-INF/dispatcher-servlet.xml] 异常

    org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/dispatcher-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/dispatcher-servlet.xml]

    解决方法:

     <servlet>
            <servlet-name>dispatcher</servlet-name>
            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
            <init-param>
                <!--这里param-name 必须是contextConfigLocation 否则会抛出异常-->
                <param-name>contextConfigLocation</param-name>
                <param-value>classpath:../springcommon/*.xml</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
  • 相关阅读:
    假期学习01
    构建之法读后感(二)
    构建之法读后感(一)
    每日日报
    每日日报
    每日日报
    每日日报
    每日日报
    每周日报
    每日日报
  • 原文地址:https://www.cnblogs.com/blogxiao/p/10673894.html
Copyright © 2011-2022 走看看