spring security rememberme 配置好后不起作用

如果发现

System.out.println(this.getClass() + ": login:" + SecurityContextHolder.getContext().getAuthentication().getName());
         System.out.println(this.getClass() + ": login:" + SecurityContextHolder.getContext().getAuthentication().getDetails());
         System.out.println(this.getClass() + ": login:" + SecurityContextHolder.getContext().getAuthentication().getAuthorities());
         System.out.println(this.getClass() + ": login:" + SecurityContextHolder.getContext().getAuthentication().getCredentials());   
         System.out.println(this.getClass() + ": login:" + SecurityContextHolder.getContext().getAuthentication().getPrincipal());

已经成功通过rememberme 登录了 ,已经配置好了, 网址不能访问不起作用可能是由于

http.authorizeRequests().anyRequest().fullyAuthenticated()  应该改为.anyRequest().authenticated()

posted on 2017-08-29 20:19  丛林摄影狮  阅读(643)  评论(0编辑  收藏  举报

导航