按照http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/mvc.html#mvc-static-resources的建議,我希望使用<mvc:resources>
來爲我的spring靜態內容提供服務。Spring爲mvc:resources提供靜態內容,無效xsd
我已經嘗試了以下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>
我想你可能通過這個link..http也水漲船高://stackoverflow.com/questions/3769888/mvcresources-type-not-resolved雖然它在eclipse中顯示錯誤,但我能夠使用'maven tomcat:run'部署應用程序 – javanoob 2010-10-01 06:23:06
這些雙**表示映射('/ css/** ')。根據我的理解,只有單個*需要包括後面的所有內容? – Abhi 2013-10-04 12:37:56