【已解决】Spring Security 后台直接登录
问题:在 Spring Security 中,无需通过前台 login 页面输入用户名和密码,在后台直接实现登录,获取对应权限。解决方法@Autowiredprotected AuthenticationManager authenticationManager;private void login (HttpServletRequest request, String username, String password) { // 将用户名,密码生成认证可用的Authentic
原创
2020-06-11 14:07:29 ·
1701 阅读 ·
0 评论