小编wol*_*olf的帖子

Spring security - authorizerequest()、anyRequest() 和authenticated() 有什么作用?

在下面的代码中,不同的链式方法有什么作用? PUBLIC_URL是一个包含公共 URL 的字符串数组。

protected void configure(HttpSecurity http ) throws Exception {

    http.authorizeRequests()
        .antMatchers(PUBLIC_URL).permitAll()
        .anyRequest().authenticated();

}
Run Code Online (Sandbox Code Playgroud)

java rest spring spring-security spring-boot

2
推荐指数
1
解决办法
1947
查看次数

标签 统计

java ×1

rest ×1

spring ×1

spring-boot ×1

spring-security ×1