十根筷子 2022-06-05 00:30 采纳率: 50%
浏览 44
已结题

security新版本问题

security的websecurityconfigureadapter被弃用,那么如何配置获取authenticationbean呢

  • 写回答

3条回答 默认 最新

  • 歇歇 2022-06-12 17:19
    关注

    用过WebSecurityConfigurerAdapter的都知道对Spring Security十分重要,总管Spring Security的配置体系。但是马上这个类要废了,你没有看错,这个类将在5.7版本被@Deprecated所标记了,这个类将被移除。

    
    @Bean
    SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
        return http
                .antMatcher("/**")
                .authorizeRequests(authorize -> authorize
                        .anyRequest().authenticated()
                )
                .build();
    }
    

    https://blog.csdn.net/qq_39652397/article/details/123070913

    评论 编辑记录

报告相同问题?

问题事件

  • 系统已结题 6月13日
  • 创建了问题 6月5日

悬赏问题

  • ¥15 封装的 matplotlib animation 不显示图像
  • ¥15 python摄像头画面无法显示
  • ¥15 关于#3d#的问题:d标定算法(语言-python)
  • ¥15 cve,cnnvd漏洞扫描工具推荐
  • ¥15 图像超分real-esrgan网络自己训练模型遇到问题
  • ¥15 如何构建全国统一的物流管理平台?
  • ¥100 ijkplayer使用AndroidStudio/CMake编译,如何支持 rtsp 直播流?
  • ¥15 用js遍历数据并对非空元素添加css样式
  • ¥15 使用autodl云训练,希望有直接运行的代码(关键词-数据集)
  • ¥50 python写segy数据出错