No cache or cacheManager properties have been set. Authorization cache cannot be obtained.

未设置授权缓存

解决:

           只需要关闭授权缓存:

myRealm.authorizationCachingEnabled = false

我是springboot项目:

        在配置authRealm的bean里加上:

authRealm.setAuthorizationCachingEnabled(false);

如下:

发布了39 篇原创文章 · 获赞 6 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/qq_40155654/article/details/88796688