cl
6 天以前 cb2f02d60aac235f2f9e5ef777e0141fb697c264
rsf-server/src/main/java/com/vincent/rsf/server/common/service/RedisService.java
@@ -36,6 +36,9 @@
      if (null == this.pool) {
         JedisPoolConfig config = new JedisPoolConfig();
         config.setTestOnBorrow(false);
         config.setMaxWaitMillis(5000L);
         int maxTotal = redisProperties.getMax() > 0 ? redisProperties.getMax() : 32;
         config.setMaxTotal(maxTotal);
         this.index = redisProperties.getIndex();
         // 空白密码传 null,不向未开认证的 Redis 发 AUTH
         String pwd = StringUtils.trimToNull(redisProperties.getPassword());
@@ -256,6 +259,8 @@
         return jedis.get(flag + LINK + key);
      } catch (Exception e) {
         log.error(this.getClass().getSimpleName(), e);
      } finally {
         jedis.close();
      }
      return null;
   }
@@ -277,6 +282,8 @@
         return jedis.del(keys);
      } catch (Exception e) {
         log.error(this.getClass().getSimpleName(), e);
      } finally {
         jedis.close();
      }
      return null;
   }
@@ -595,6 +602,8 @@
      } catch (Exception e) {
         log.error(this.getClass().getSimpleName(), e);
         return true;
      } finally {
         jedis.close();
      }
   }