最近我遇到了一个Spring项目,在其中看到了以下的安全配置:
<intercept-url pattern="/register/**" access="permitAll()" />
在谷歌搜索并深入挖掘后,我无法找到双星号/register/**
的含义。如果有人能够解释一下,那就太好了。星号在Spring Security中的URL中的意义是什么。
最近我遇到了一个Spring项目,在其中看到了以下的安全配置:
<intercept-url pattern="/register/**" access="permitAll()" />
在谷歌搜索并深入挖掘后,我无法找到双星号/register/**
的含义。如果有人能够解释一下,那就太好了。星号在Spring Security中的URL中的意义是什么。
这些模式是Ant-style路径模式(https://ant.apache.org/manual/dirtasks.html#patterns)。其中 ** 匹配路径中的零个或多个“目录”,请参阅AntPathMatcher。