spring security关闭http验证

@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
 
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        
        http.authorizeRequests()
                .anyRequest().permitAll().and().logout().permitAll();//配置不需要登录验证
    }
}
发布了45 篇原创文章 · 获赞 6 · 访问量 4851

猜你喜欢

转载自blog.csdn.net/weixin_45493345/article/details/105144694