private final AuthenticationManagerBuilder authenticationManagerBuilder;
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, password);
Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken);
参数解析:
username和password是前端传过来的
原文:https://www.cnblogs.com/kaka-qiqi/p/14771242.html