SpringBoot_集成Shiro后获取当前用户


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


protected User getCurrentUser(){
return (User) SecurityUtils.getSubject().getPrincipal();
}
文章来自:https://www.cnblogs.com/Amos-Turing/p/8725165.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3