S安全配置
作者:互联网
配置 Spring Security
WebSecurityConfigurerAdapter中的configure(HttpSecurity)
protected void configure(HttpSecurity http) throws Exception {
logger.debug("Using default configure(HttpSecurity). If subclass");
http
.authorizeRequests()
.anyRequest().authenticated() // 任何请求都会进行认证
.and()
.formLogin() // 启动内建的登录界面
.and()
.httpBasic(); // 使用 HTTP Basic Auth 进行认证
}
标签:http,configure,配置,Auth,认证,安全,Basic,HttpSecurity 来源: https://blog.csdn.net/weixin_45647118/article/details/117482919