SpringSecurity过滤路径的问题
无爱大叔 2021-01-15 08:36:56 一个网站项目采用了springsecurity和thymeleaf
网站首页地址为:http://localhost/index
网站后台地址为:http://localhost/login
直接访问http://localhost/index和后台地址没问题,当访问类似http://localhost/index?xxid=udi932akkdz==&token=3990201993331这样的url时会跳到http://localhost/login登录页,这里(外部)传入的xxid和token我在网站里是不用做任何处理的
SpringSecurity过滤路径我是放在这里的
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().antMatchers("不需要认证的资源路径").permitAll();
}
上面这个地方应该怎么写才能同时放行/index和/index?xxid=xxx&token=xxx