您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

Spring Security在安全注释配置中排除URL模式

Spring Security在安全注释配置中排除URL模式

在Github上发布的Spring安全示例中找到了解决方案。

WebSecurityConfigurerAdapter一个重载的configure消息,该消息以WebSecurity参数为参数,接受要忽略的请求的蚂蚁匹配器。

@Override
public void configure(WebSecurity web) throws Exception {
    web.ignoring().antMatchers("/authFailure");
}
Java 2022/1/1 18:16:41 有452人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶