我開發本地使用兩個碼頭和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