日期:2014-05-17  浏览次数:21081 次

Resource interpreted as Stylesheet but transferred with MIME type text/html
好好的突然css js加载不了了,之前也就改了几个jsp controller,求大神看破真相

springmvc配置文件
<?xml version="1.0" encoding="UTF-8"?>  
<beans xmlns="http://www.springframework.org/schema/beans" 
 xmlns:context="http://www.springframework.org/schema/context" 
 xmlns:mvc="http://www.springframework.org/schema/mvc" 
 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.2.xsd 
      http://www.springframework.org/schema/context 
      http://www.springframework.org/schema/context/spring-context-3.2.xsd 
      http://www.springframework.org/schema/mvc 
      http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd"> 
    
     <context:component-scan base-package="controller" /> 
     <mvc:annotation-driven /> 
     <mvc:resources location="/img/" mapping="/img/**"/> 
     <mvc:resources location="/css/" mapping="/css/**"/>
     <mvc:resources location="/js/" mapping="/js/**"/>
     <mvc:resources location="/font-awesome/" mapping="/font-awesome/**"/>
     <mvc:resources location="/style/" mapping="/style/**"/>
     <mvc:interceptors>
          <mvc:interceptor>
<mvc:mapping path="/um/**"/>              
<bean class="interceptor.UserInterceptor" />
          </mvc:interceptor>
      </mvc:interceptors>
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
    <property name="maxUploadSize" value="1000000" />
</bean>
<!-- ViewResolver -->  
<bean id="viewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver">
  <property name="basename" value="views"/>
  <property name="order" value="1"/>
</bean>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">  
     <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
     <property name="prefix" value="/"/>  
     <property name="suffix" value=".jsp"/>  
</bean> 
</beans>  

web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
  <display-name>Caiyuanzi</display-name>