【发布时间】:2019-08-02 03:45:39
【问题描述】:
我试图忽略 SpringBoot 中 WebSecurity 的 url。能够为精确的网址匹配做到这一点。但是如果 url 本身有一个参数,它就不能忽略它。有没有更好的方法来忽略 url,比如忽略特定的控制器。如果没有,如何使用参数?
@Override
public void configure(WebSecurity web) throws Exception {
web.ignoring().antMatchers("/api/v1/something");
// was able to ignore [url]/api/v1/something but not [url]/api/v1/something?xyz=wjsbjbjbsjbw
}
【问题讨论】:
-
添加“*”发布你的网址,它会为你工作
标签: spring spring-boot websecurity