URL spring 拦截器中的路径模式匹配
URL path pattern matching in spring interceptor
我想从 spring mvc 应用程序中的拦截器中排除我的静态资源。
我正在使用像-
这样的排除路径
<mvc:exclude-mapping path="/resources/**.js"/>
但对以下路径不起作用,因为路径中有dots(.)
:
/com-crud/resources/static/plugins/jquery/jquery.validate.min.js
我应该使用什么模式来匹配这个路径?
如果要指定文件类型,请尝试以下方法
<mvc:exclude-mapping path="/resources/**/*.js"/>
或者只删除评论中所说的文件类型
<mvc:exclude-mapping path="/resources/**"/>
我想从 spring mvc 应用程序中的拦截器中排除我的静态资源。 我正在使用像-
这样的排除路径<mvc:exclude-mapping path="/resources/**.js"/>
但对以下路径不起作用,因为路径中有dots(.)
:
/com-crud/resources/static/plugins/jquery/jquery.validate.min.js
我应该使用什么模式来匹配这个路径?
如果要指定文件类型,请尝试以下方法
<mvc:exclude-mapping path="/resources/**/*.js"/>
或者只删除评论中所说的文件类型
<mvc:exclude-mapping path="/resources/**"/>