我正在尝试为登录页面创建注销选项。
AntPathRequestMatcher pathRequestMatcher = new AntPathRequestMatcher("/logout");
http.logout().logoutRequestMatcher(pathRequestMatcher);
由于org.springframework.security.web.util.AntPathRequestMatcher.AntPathRequestMatcher
在Spring Security 4.1.6中是deprecated
,我应该使用哪个类?
答案 0 :(得分:3)
AntPathRequestMatcher在Spring 3.x和Spring 4.x之间移动了软件包
引自Migrating from Spring Security 3.x to 4.x:
RequestMatcher及其实现已从软件包中移出
org.springframework.security.web.util
至org.springframework.security.web.util.matcher
。特别是
org.springframework.security.web.util.AntPathRequestMatcher
→org.springframework.security.web.util.matcher.AntPathRequestMatcher