http://blog.csdn.net/young_so_nice/article/details/70144372
解决:
1,检查springmvc是否加了静态资源加载
<mvc:annotation-driven />
<!-- 静态资源访问 -->
<mvc:resources mapping="/DataTables/**" location="/DataTables/" />
<!--从根目录开始找资源-->
<!-- <mvc:resources location="/" mapping="/**/*.js"/>
<mvc:resources location="/" mapping="/**/*.css"/> -->
<mvc:default-servlet-handler />
<!-- 添加注解驱动 -->
<!-- <mvc:annotation-driven /> -->
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property>
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
![这里写图片描述](https://img-blog.csdn.net/20170412161634220?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveW91bmdfc29fbmljZQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
2,终极解决方法在web.xml文件中添加配置,注意这个配置要加在springmvc之前。
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.jpg</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.js</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.css</url-pattern>
</servlet-mapping>