springBoot集成shiro+redis遇到的坑

今天在整合springboot和shiro使用redis做緩存的時候遇到個坑  記錄一下 在doGetAuthorizationInfo方法進行權限校驗時發生錯誤 代碼定位在這行 UUser token = (UUser) SecurityUtils.getSubject().getPrincipal(); 貼出異常 發現是同一類型竟然不能進行強制類型轉換,使用redis管理緩存後出現此問題。 出
相關文章
相關標籤/搜索