1

当使用 spring security web 时,我们可以使用 antMathcers

http.authorizeRequests()
    .antMatchers("/admin/**")

使用 webflux 时,我们使用

http.authorizeExchange(exchanges->
                        exchanges
                                .pathMatchers("/admin/**")
                                .permitAll()
                                .anyExchange()
                                .authenticated()
)

问题是,我们可以有蚂蚁图案的第一种方法 "/admin/**/test"

但是第二种方式,上面的方法会出错。

如何在 webflux 环境中实现上述 uri 模式?

4

0 回答 0