如何在Spring Security Antmatchers中使用参数

时间:2018-07-24 09:33:40

标签: java spring spring-mvc spring-security

我应该如何在春季的antmatchers中使用这样的参数? 我有许多以/ sUrl开头的URL,并且具有不同的参数。 该代码无效!

//don't works
    .antMatchers("/sUrl?params={url:\"reports/Manager\",subSystem:\"ABS\"}/**").access("hasRole('ROLE_ABS')")

sUrl?params = {url:%22reports / Manager%22,subSystem:%22ABS%22}

1 个答案:

答案 0 :(得分:0)

You can probably solve your problem using regExMatcher

See HttpSecurity regExMatcher method for more details.