alexxiyang / shiro-redis

shiro only provide the support of ehcache and concurrentHashMap. Here is an implement of redis cache can be used by shiro. Hope it will help you!
MIT License
1.17k stars 444 forks source link

springboot版本2.24使用jedis版本3.1.0,报出找不到方法错误,像是不太支持新版本jedis #125

Closed zwnop closed 4 years ago

zwnop commented 4 years ago

用的shiro-redis版本是3.2.3

Caused by: java.lang.NoSuchMethodError: redis.clients.jedis.ScanResult.getStringCursor()Ljava/lang/String; at org.crazycake.shiro.WorkAloneRedisManager.keys(WorkAloneRedisManager.java:149) at org.crazycake.shiro.RedisSessionDAO.getActiveSessions(RedisSessionDAO.java:110) at com.zkgl.itms.controller.LoginController.login(LoginController.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) ... 57 common frames omitted 试过降低jedis版本,但是和springboot2.2.4不太兼容

LQF-dev commented 4 years ago

我也存在这个问题。。。。不知道怎么解决。。。

alexxiyang commented 4 years ago

因为新版Jedis去掉了getStringCursor方法,请更新成3.3.0版本