Java 在applicationcontext.xml中添加资源标记后引发404错误

Java 在applicationcontext.xml中添加资源标记后引发404错误,java,spring-mvc,Java,Spring Mvc,我正在将css和js文件夹添加到资源文件夹中,并尝试从jsp页面访问它,该页面在web inf文件夹中被接收,当我要添加标记时抛出404错误: applicaton-context.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.sprin

我正在将css和js文件夹添加到资源文件夹中,并尝试从jsp页面访问它,该页面在web inf文件夹中被接收,当我要添加标记时抛出404错误:

applicaton-context.xml

<beans xmlns="http://www.springframework.org/schema/beans"
     xmlns:mvc="http://www.springframework.org/schema/mvc"
   xmlns:context="http://www.springframework.org/schema/context"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="
   http://www.springframework.org/schema/beans     
   http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
   http://www.springframework.org/schema/context 
   http://www.springframework.org/schema/context/spring-context-3.0.xsd
   http://www.springframework.org/schema/mvc 
   http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">

   <context:component-scan base-package="com.test" />

   <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
      <property name="prefix" value="/WEB-INF/jsp/" />
      <property name="suffix" value=".jsp" />
   </bean>

   <mvc:resources mapping="/resources/**" location="/resources/" /> 
</beans>
若我移除标记,那个么应用程序就启动了,并且工作正常。 我发现这个错误是由于应用程序找不到资源文件夹造成的