SpringBoot_集成Shiro后获取当前用户


//SecurityUtils.getSubject().getPrincipal();  就可以获取了


protected User getCurrentUser(){
return (User) SecurityUtils.getSubject().getPrincipal();
}
posted @ 2018-04-06 00:20  ldp.im  阅读(743)  评论(0编辑  收藏  举报