我开发本地使用两个码头和Tomcat。试图让MVC资源来为我的静态资源
我的图片,CSS,JavaScript文件是:
/src/main/webapp/assets
在文件夹的资产有:
/src/main/webapp//assets/images
/src/main/webapp//assets/css
/src/main/webapp//assets/images/
我的Spring配置文件有:
<mvc:resources mapping="/assets/**" location="/" />
我混淆映射和位置都意味着什么?
我想映射意味着春天将只尝试和服务于静态文件,如果有喜欢的图案的网址:
www.example.com/assets/
是什么位置呢?
我的HTML目前拥有:
src="/assets/images/logo.gif"
我试着位置值耍了,我没有得到渲染出于某种原因图像。
有人可以清除此为我?
你看了在http://static.springsource.org/spring/docs/current/spring-framework-reference/html/mvc.html点16.14.5? – madth3 2012-03-27 23:49:49