调试security异常
This commit is contained in:
@ -31,6 +31,11 @@ public class BaseCacheUserServiceImpl implements IBaseCacheUserService {
|
|||||||
@Override
|
@Override
|
||||||
public BaseCacheUser getCacheUser() {
|
public BaseCacheUser getCacheUser() {
|
||||||
BaseCacheUser buser = new BaseCacheUser();
|
BaseCacheUser buser = new BaseCacheUser();
|
||||||
|
|
||||||
|
System.out.println(SecurityContextHolder.getContext());
|
||||||
|
System.out.println(SecurityContextHolder.getContext().getAuthentication());
|
||||||
|
System.out.println(SecurityContextHolder.getContext().getAuthentication().getPrincipal());
|
||||||
|
|
||||||
BeanUtils.copyProperties(SecurityContextHolder.getContext().getAuthentication().getPrincipal(), buser);
|
BeanUtils.copyProperties(SecurityContextHolder.getContext().getAuthentication().getPrincipal(), buser);
|
||||||
|
|
||||||
log.debug("Current user principal: " + buser);
|
log.debug("Current user principal: " + buser);
|
||||||
|
Reference in New Issue
Block a user