错误信息如下:

解决办法:
在springmvc配置中添加
<mvc:default-servlet-handler/>
注意配置

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

本文介绍了解决SpringMVC项目中特定错误的方法。通过在配置文件中加入<mvc:default-servlet-handler/>标签,并正确声明命名空间及其对应的xsd文件,可以有效处理静态资源访问的问题。
3335

被折叠的 条评论
为什么被折叠?



