Is there a way to get the complete path value after the requestMapping @PathVariable values have been parsed?
这就是:
/{id}/{restOfTheUrl}应该可以解析/1/dir1/dir2/file.html成id=1和restOfTheUrl=/dir1/dir2/file.html
任何想法,将不胜感激.
当我们提到路径时,两个星号而不是一个星号之间的区别是什么?
之前我正在调试我的Spring 3项目.我试图添加一个.swf
<spring:url var="flashy" value="/resources/images/flash.swf"/>
我的web.xml的ResourceServlet看起来像
<servlet-name>Resource Servlet </servlet-name>
<url-pattern>/resources/*</url-pattern>
Run Code Online (Sandbox Code Playgroud)
但不幸的是我收到了这个错误:
WARN org.springframework.js.resources.ResourceServlet - An attempt to access a protected resource at /images/flash.swf was disallowed.
我发现它真的很奇怪,因为images文件夹中的所有图像都被访问了但是我的.swf怎么会受到"保护"?
后来,我决定改变/resources/*到/resources/**最后和它的工作.我的问题是......为什么?