企业级安全框架—spring security http basic基本认证(二)

1、创建受保护的资源controller接口 2、配置http basic authentication 2.1 继承WebSecurityConfigurerAdapter,@EnableWebSecurity 开启spring security保护机制 2.2 启动项目访问http://localhost:8080/getHomeInfo 2.3 输入用户名:user,密码:控制台打印的随机字
相关文章
相关标签/搜索