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>

 

相关文章:

  • 2022-12-23
  • 2021-10-01
  • 2021-09-12
  • 2021-08-26
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2021-05-30
  • 2022-12-23
相关资源
相似解决方案