JFinal

登录 注册

jfinal RedisPlugin Readtimeout 异常

11-Oct-2018 10:32:50.716 严重 [http-nio-8081-exec-1] com.jfinal.core.ActionHandler.error /

 redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out

at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:202)

at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40)

at redis.clients.jedis.Protocol.process(Protocol.java:151)

at redis.clients.jedis.Protocol.read(Protocol.java:215)

at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)

at redis.clients.jedis.Connection.getBinaryBulkReply(Connection.java:259)

at redis.clients.jedis.BinaryJedis.get(BinaryJedis.java:244)

at com.jfinal.plugin.redis.Cache.get(Cache.java:91)

at controller.IndexController.index(IndexController.java:13)

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 com.jfinal.aop.Invocation.invoke(Invocation.java:73)

at com.jfinal.core.ActionHandler.handle(ActionHandler.java:78)

at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:73)


我想知道怎样配置做redis的基本配置呢

评论

  • 10-11 10:46
    RedisPlugin 有一个 getJedisPoolConfig() 方法,拿到 JedisPoolConfig对象后,直接配置里面的很多配置即可
  • 10-11 14:42
    @JFinal 好的,谢啦
  • 发送