AntPathRequestMatcher已经过时,有什么替代方法?

3
我正在尝试为登录页面创建一个注销选项。
  AntPathRequestMatcher pathRequestMatcher = new AntPathRequestMatcher("/logout");
  http.logout().logoutRequestMatcher(pathRequestMatcher); 

由于在Spring Security 4.1.6中,org.springframework.security.web.util.AntPathRequestMatcher.AntPathRequestMatcher已经被deprecated,那么我应该使用哪个类呢?


1
@seelenvirtuose 我在导入 org.springframework.security.web.util.AntPathRequestMatcher 时看到了它。 - Dil.
1
抱歉 @codeer,它是 4.1.6.RELEASE - Dil.
1个回答

4

AntPathRequestMatcher在Spring 3.x和Spring 4.x之间的包已经移动

引用自从Spring Security 3.x迁移到4.x:

RequestMatcher及其实现已从包org.springframework.security.web.util移至org.springframework.security.web.util.matcher

具体而言

org.springframework.security.web.util.AntPathRequestMatcherorg.springframework.security.web.util.matcher.AntPathRequestMatcher


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接