SSM项目报错:class path resource [springmvc.xml] cannot be opened because it does not exist

之前配置:

<servlet>

    <servlet-name>springmvc</servlet-name>

    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

    <init-param>

        <!-- 指定springmvc配置文件的路径。如果不指定,默认为:/WEB-INF/${servlet-name}-servlet.xml -->

        <param-name>contextConfigLocation</param-name>

        <param-value>classpath:springmvc.xml</param-value>  //这个位置出错了

    </init-param>

</servlet>

<servlet-mapping>

    <servlet-name>springmvc</servlet-name>

    <url-pattern>*.action</url-pattern>

</servlet-mapping>
<servlet>

    <servlet-name>springmvc</servlet-name>

    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

    <init-param>

        <!-- 指定springmvc配置文件的路径。如果不指定,默认为:/WEB-INF/${servlet-name}-servlet.xml -->

        <param-name>contextConfigLocation</param-name>

        <param-value>/WEB-INF/springmvc.xml</param-value>   

    </init-param>

</servlet>

<servlet-mapping>

    <servlet-name>springmvc</servlet-name>

    <url-pattern>*.action</url-pattern>

</servlet-mapping>

</web-app>

你可能感兴趣的:(SSM项目报错:class path resource [springmvc.xml] cannot be opened because it does not exist)