Spring-security cannot match “?parameter” format?

后端 未结 2 848
我寻月下人不归
我寻月下人不归 2020-12-19 05:39

I use spring-security to secure my web, when I\'m learning it by spring-roo generated config file in applicationContext-security.xml, in node:

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-19 05:49

    That behavior is defined by the "request-matcher" in use. As indicated by the documentation, the default is "ant", which indicates to use an AntPathRequestMatcher, and an alternative is "regex", the RegexRequestMatcher. The javadocs (linked) give specifics about the matchers, including the fact that the former matches against a request's "servletPath + pathInfo", and the latter against its "servletPath + pathInfo + queryString".

提交回复
热议问题