【发布时间】:2011-04-19 06:23:10
【问题描述】:
根据http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/mvc.html#mvc-static-resources 的建议,我希望使用<mvc:resources> 来提供我的spring 静态内容。
我尝试了以下 XML,但 .xsd 文件不包含 <mvc:resources> 的声明,并且我找不到替代 .xsd。我可以忽略 eclipse 错误,但由于 SAXParseException,服务器不会启动。
我哪里出错了?
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
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.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
<mvc:resources mapping="/css/**" location="/css/"/>
</beans>
【问题讨论】:
-
我想你可能已经通过了这个链接..stackoverflow.com/questions/3769888/… 我能够使用
maven tomcat:run部署应用程序,尽管它在 eclipse 中显示错误 -
这些双精度
**在映射 (/css/**) 中表示什么。据我了解,只需要一个 * 来包含它之后的所有内容吗?
标签: spring spring-mvc