From 表单模式 适合于传统模式项目 前端和后端都是我们java开发
人员自己实现,Vue+SpringBoot
protected void configure(HttpSecurity http) throws Exception {
// /**
// * 拦截 http 安全认证模式 设置为httpBasic模式
// */
// http.authorizeRequests().antMatchers("/**").fullyAuthenticated()
// .and().httpBasic();
/**
* 拦截 http 安全认证模式 设置为formLogin模式
*/
http.authorizeRequests().antMatchers("/**").fullyAuthenticated()
.and().formLogin();
}
默认使用cookie存放内容。