登录写入session
在执行登录动作时,在successhandler中,当有流开启对响应头做出修改时就会触发一个onResponseCommit方法,里面调用了HttpSessionSecurityContextRepository.saveContent的方法对session写入或更新
@Override
protected void saveContext(SecurityContext context) {
final Authentication authentication = context.getAuthentication();
HttpSession httpSession = request.getSession(false);
// See SEC-776
if (authentication == null || trustResolver.isAnonymous(authentication)) {
if (logger.isDebugEnabled()) {
logger.debug(