redis 出现 redis.clients.jedis.exc

2017-06-09  本文已影响0人  山水风情
redis中出现Unexpected end of stream.png

点进来后发现抛异常的地方


Unexpected end of stream.png

<code>
这个时候需要在config中配置下就好了 , 我这里所写的只是javase 上操作,所以没有使用xml文件进行配置
</code>

        private final static JedisPool POOL ;
    static {
        //1.连接池配置对象
        JedisPoolConfig config = new JedisPoolConfig();
        // 可选的操作
        // 这只连接池最大连接数
        config.setMaxTotal(50);
        // 设置空闲时池中保有的最大连接数
        config.setMaxIdle(10);
        config.setMaxWaitMillis(1000 * 100); 
        config.setTestOnBorrow(true); 
        // 2. 设置连接池对象
        POOL = new JedisPool(config, "192.168.2.154", 6379,1000,"123456");
    }
上一篇 下一篇

猜你喜欢

热点阅读