Redis-3.2.4集群配置(RedisCluster+SpringBoot+Jedis)

时间:2021-12-13 17:29:35

此文由本人参考其他大神文档和资料,再结合当前环境做出的配置,有什么问题请联系我.



部署计划部署6个redis节点,为3主3从。
端口 IP地址
6379 192.168.101.121
6379
192.168.101.199
6379
192.168.101.123
6379
192.168.101.127
6379
192.168.101.125
6379
192.168.101.126

目录结构
/data/redis|-- bin|   |-- redis-benchmark|   |-- redis-check-aof|   |-- redis-check-dump|   |-- redis-cli|   |-- redis-sentinel -> redis-server|   `-- redis-server|-- data
|   `-- 6379
|-- conf|   `-- redis.conf`-- log

编译安装    (所有关于权限问题全部sudo,启动服务 sudo ./redis-server /data/redis/conf/redis.conf,真实环境下,若是以一个较低的权限启动redis,那么就可能产生无法创建日志以及rdb的问题)
创建目录    mkdir redis    cd redis
下载解压安装包    wget http://download.redis.io/releases/redis-3.2.4.tar.gz    tar zxvf redis-3.2.4.tar.gz
    cd redis-3.2.4    make
    make install PREFIX=/data/redis-3.2.4    //默认安装到/usr/local/bin目录下。这里指定安装目录data/redis-3.2.4    ln -s /data/redis-3.2.4 /data/redis    //软连接    mkdir /data/redis/conf    //创建目录结构    mkdir /data/redis/log    mkdir /data/redis/data    cp /home/redis/redis/redis-3.2.4/redis.conf /data/redis/conf/    //copy配置文件    vim /data/redis/conf/redis.conf

redis的配置    protected-mode no    //关闭保护模式    port 6379    //端口    daemonize yes    //守护进程开启,默认服务从后台启动
    loglevel verbose    //日志级别    logfile /data/redis/log/redis-6379.log    //日志文件位置    ==redis持久化rdb,AOF相关==    dbfilename dump.rdb    //redis持久化文件名称    dir /data/redis/data/6379    //redis持久化文件路径,默认为当前路径    appendonly yes    //开启AOF    appendfilename "appendonly.aof"    //AOF文件名称
    no-appendfsync-on-rewrite yes    //子进程在做rewrite时,主进程不调用fsync(由内核默认调度)
    ==REPLICATION==    slave-serve-stale-data yes    //当slave与master断开连接,slave继续提供服务
    slave-read-only yes    repl-ping-slave-period 1    //slave ping master的时间间隔,单位为秒    repl-timeout 10    //复制超时,单位为秒,须大于repl-ping-slave-period的值     ==REDIS CLUSTER==
    cluster-enabled yes    //开启集群配置    cluster-config-file nodes-6379.conf    //节点配置文件,这个文件是服务启动时自己配置创建的    cluster-node-timeout 5000    //集群中各节点相互通讯时,允许"失联"的最大毫秒数,如果超过没向其它节点汇报成功,就认为该节点已挂。
    cluster-slave-validity-factor 0    //将该项设置为0,不管slave节点和master节点间失联多久都会一直尝试failover    repl-ping-slave-period 1
其他5台机器配置    相同操作目录可直接远程拷贝
    scp -r redis@192.168.101.126:/data/redis/data /data/redis/    scp -r redis@192.168.101.126:/data/redis/conf /data/redis/    scp -r redis@192.168.101.126:/data/redis/log /data/redis/

创建和启动redis cluster前的准备工作
    yum -y install ruby    //安装ruby        yum -y install rubygems    //安装rubygems    
    wget https://rubygems.org/downloads/redis-3.3.1.gem    //安装redis-3.3.1.gem
    gem install -l redis-3.3.1.gem
    cp redis-3.2.4/src/redis-trib.rb /data/redis/bin/    //redis-trib.rb是redis官方提供的redis cluster管理工具,使用ruby实现。    ./redis-server /data/redis/conf/redis.conf    //启动6台服务
创建redis cluster
    redis-trib.rb create --replicas 1 192.168.101.121:6379 192.168.101.199:6379 192.168.101.123:6379 192.168.101.127:6379 192.168.101.125:6379 192.168.101.126:6379    #redis-trib.rb的create子命令构建      #--replicas 则指定了为Redis Cluster中的每个Master节点配备几个Slave节点 
进入redis客户端    redis-cli -c -p 6379    //-c进入集群模式    info//查看信息
    cluster nodes//查看节点信息    CLUSTER SLOTS//查看插槽信息
节点操作    ./redis-trib.rb del-node 192.168.101.121:6379 '2ff326bc9084236ee6540d58d307893662ceff0b'//删除节点
    ./redis-trib.rb add-node --slave --master-id 0ecc54ed34cc7e2e1ebca168ab4564b803992094 192.168.101.121:6379 192.168.101.125:6379//添加从节点,添加前需要删除已存在的node.conf,rdb,aof文件    ./redis-trib.rb reshard 192.168.101.121:6379//为新节点分配slot    ./redis-trib.rb check 192.168.101.121:6379    //检查集群运行状态,只要输入任意集群中节点即可,会自动检查所有相关节点。
    ./redis-trib.rb fix 192.168.101.121:6379    //修复集群(若node移除了,但是并没有移除node上面的slot,从而导致了slot总数没有达到16384,其实也就是slots分布不正确。所以在删除节点的时候一定要注意删除的是否是Master主节点)。
关于集群创建错误集群创建的时候如果没有创建成功,那么需要删除集群节点配置文件,不然无法重新创建集群sudo rm /data/redis-3.2.4/data/6379/nodes-6379.conf
Redis-3.2.4集群配置(RedisCluster+SpringBoot+Jedis)

如果遇到Waiting for the cluster to join ....................................................... >>> Sending CLUSTER MEET messages to join the cluster解决方式sudo ./redis-cli -c -p 6379    //进入客户端CLUSTER MEET <ip> <port> 将 ip 和 port 所指定的节点添加到集群当中。Redis-3.2.4集群配置(RedisCluster+SpringBoot+Jedis)
Jedis的配置config文件需要添加github上有这一句,Jedis Cluster 会自动去发现集群中的节点,所以JedisClusterNodes只需要 add一个实例
<div class="linenums" style="margin: 0px; color: rgb(30, 52, 123); padding-left: 30px !important;"><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="com" style="color: rgb(147, 161, 161);">// JedisCluster</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Bean</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JedisCluster</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JedisClusterFactory</span><span class="pun" style="color: rgb(147, 161, 161);">()</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">LOG</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">info</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">"JedisCluster创建!!"</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">LOG</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">info</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">"redis地址:"</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">+</span><span class="pln" style="color: rgb(72, 72, 76);"> host </span><span class="pun" style="color: rgb(147, 161, 161);">+</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="str" style="color: rgb(221, 17, 68);">":"</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">+</span><span class="pln" style="color: rgb(72, 72, 76);"> port</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">Set</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">HostAndPort</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> jedisClusterNodes </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">HashSet</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">HostAndPort</span><span class="pun" style="color: rgb(147, 161, 161);">>();</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">JedisPoolConfig</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisPoolConfig </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JedisPoolConfig</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">jedisPoolConfig</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">setMaxIdle</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">maxIdle</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">jedisPoolConfig</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">setMaxWaitMillis</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">maxWaitMillis</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">jedisClusterNodes</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">add</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">HostAndPort</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">host</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> port</span><span class="pun" style="color: rgb(147, 161, 161);">));</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">JedisCluster</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisCluster </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JedisCluster</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">jedisClusterNodes</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisPoolConfig</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisCluster</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div></div>

dao
<div class="linenums" style="margin: 0px; color: rgb(30, 52, 123); padding-left: 30px !important;"><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">package</span><span class="pln" style="color: rgb(72, 72, 76);"> com</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">unioncast</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">db</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">rdbms</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">core</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">dao</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">commonDBDao</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">impl</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> java</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">io</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">IOException</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> java</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">util</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">ArrayList</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> java</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">util</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">Iterator</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> java</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">util</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">List</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> java</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">util</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">Map</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> java</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">util</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">Map</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">Entry</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> java</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">util</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">UUID</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">beans</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">factory</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">annotation</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">Autowired</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">stereotype</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">Repository</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> com</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">unioncast</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">common</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">util</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">JsonUtil</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> com</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">unioncast</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">db</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">rdbms</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">core</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">dao</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">commonDBDao</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">RedisDao</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> redis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">clients</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">jedis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">JedisCluster</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="lit" style="color: rgb(25, 95, 145);">@Repository</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">"redisDao"</span><span class="pun" style="color: rgb(147, 161, 161);">)</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">class</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">RedisDaoImpl</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">implements</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">RedisDao</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Autowired</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">JedisCluster</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisCluster</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Override</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="pln" style="color: rgb(72, 72, 76);">T</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> addByKey</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> key</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> T object</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">throws</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">IOException</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> object2JsonString </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JsonUtil</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">object2JsonString</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">object</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> set </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisCluster</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">set</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">key</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> object2JsonString</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> set</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Override</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="pln" style="color: rgb(72, 72, 76);">T</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> add</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">T object</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">throws</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">IOException</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> uuid </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> UUID</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">randomUUID</span><span class="pun" style="color: rgb(147, 161, 161);">().</span><span class="pln" style="color: rgb(72, 72, 76);">toString</span><span class="pun" style="color: rgb(147, 161, 161);">().</span><span class="pln" style="color: rgb(72, 72, 76);">trim</span><span class="pun" style="color: rgb(147, 161, 161);">().</span><span class="pln" style="color: rgb(72, 72, 76);">replaceAll</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">"-"</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="str" style="color: rgb(221, 17, 68);">""</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> object2JsonString </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JsonUtil</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">object2JsonString</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">object</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">jedisCluster</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">set</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">uuid</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> object2JsonString</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> uuid</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Override</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">Object</span><span class="pln" style="color: rgb(72, 72, 76);"> getObject</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> key</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">throws</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">IOException</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> string </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisCluster</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">get</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">key</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">Object</span><span class="pln" style="color: rgb(72, 72, 76);"> json2Object </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JsonUtil</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">json2Object</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">string</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">Object</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="kwd" style="color: rgb(30, 52, 123);">class</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> json2Object</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Override</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="pln" style="color: rgb(72, 72, 76);">T</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">List</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">String</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> addList</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">List</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="pln" style="color: rgb(72, 72, 76);">T</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> list</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">throws</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">IOException</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">List</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">String</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> sum </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">ArrayList</span><span class="pun" style="color: rgb(147, 161, 161);"><>(</span><span class="lit" style="color: rgb(25, 95, 145);">70</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> uuid </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">null</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> str </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">null</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">for</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="kwd" style="color: rgb(30, 52, 123);">int</span><span class="pln" style="color: rgb(72, 72, 76);"> i </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="lit" style="color: rgb(25, 95, 145);">0</span><span class="pun" style="color: rgb(147, 161, 161);">;</span><span class="pln" style="color: rgb(72, 72, 76);"> i </span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="pln" style="color: rgb(72, 72, 76);"> list</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">size</span><span class="pun" style="color: rgb(147, 161, 161);">();</span><span class="pln" style="color: rgb(72, 72, 76);"> i</span><span class="pun" style="color: rgb(147, 161, 161);">++)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">uuid </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> UUID</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">randomUUID</span><span class="pun" style="color: rgb(147, 161, 161);">().</span><span class="pln" style="color: rgb(72, 72, 76);">toString</span><span class="pun" style="color: rgb(147, 161, 161);">().</span><span class="pln" style="color: rgb(72, 72, 76);">trim</span><span class="pun" style="color: rgb(147, 161, 161);">().</span><span class="pln" style="color: rgb(72, 72, 76);">replaceAll</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">"-"</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="str" style="color: rgb(221, 17, 68);">""</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">str </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JsonUtil</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">object2JsonString</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">list</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">get</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">i</span><span class="pun" style="color: rgb(147, 161, 161);">));</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">jedisCluster</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">set</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">uuid</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> str</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">sum</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">set</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">i</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> uuid</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> sum</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Override</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="pln" style="color: rgb(72, 72, 76);">T</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> addListKey</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">List</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">String</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> strList</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">List</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="pln" style="color: rgb(72, 72, 76);">T</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> list</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">throws</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">IOException</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">null</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Override</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="pln" style="color: rgb(72, 72, 76);">T</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">Long</span><span class="pln" style="color: rgb(72, 72, 76);"> addListKey</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">Map</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">String</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> T</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> map</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">throws</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">IOException</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">Long</span><span class="pln" style="color: rgb(72, 72, 76);"> sum </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="kwd" style="color: rgb(30, 52, 123);">long</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="lit" style="color: rgb(25, 95, 145);">0</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> str </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">null</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">Iterator</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">Entry</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">String</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> T</span><span class="pun" style="color: rgb(147, 161, 161);">>></span><span class="pln" style="color: rgb(72, 72, 76);"> iterator </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> map</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">entrySet</span><span class="pun" style="color: rgb(147, 161, 161);">().</span><span class="pln" style="color: rgb(72, 72, 76);">iterator</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">while</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">iterator</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">hasNext</span><span class="pun" style="color: rgb(147, 161, 161);">())</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">Entry</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">String</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> T</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> entry </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">Entry</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">String</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> T</span><span class="pun" style="color: rgb(147, 161, 161);">>)</span><span class="pln" style="color: rgb(72, 72, 76);"> iterator</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">next</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> key </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> entry</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">getKey</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">T object </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> entry</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">getValue</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">str </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JsonUtil</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">object2JsonString</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">object</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">jedisCluster</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">set</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">key</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> str</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">sum </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> sum </span><span class="pun" style="color: rgb(147, 161, 161);">+</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="lit" style="color: rgb(25, 95, 145);">1</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> sum</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Override</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">Long</span><span class="pln" style="color: rgb(72, 72, 76);"> deleteByKey</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> key</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">throws</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">IOException</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">Long</span><span class="pln" style="color: rgb(72, 72, 76);"> del </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisCluster</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">del</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">key</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> del</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Override</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">Long</span><span class="pln" style="color: rgb(72, 72, 76);"> batchDelete</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">List</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">String</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> strList</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">throws</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">IOException</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">Long</span><span class="pln" style="color: rgb(72, 72, 76);"> sum </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="kwd" style="color: rgb(30, 52, 123);">long</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="lit" style="color: rgb(25, 95, 145);">0</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">Long</span><span class="pln" style="color: rgb(72, 72, 76);"> del </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="kwd" style="color: rgb(30, 52, 123);">long</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="lit" style="color: rgb(25, 95, 145);">0</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">for</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="kwd" style="color: rgb(30, 52, 123);">int</span><span class="pln" style="color: rgb(72, 72, 76);"> i </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="lit" style="color: rgb(25, 95, 145);">0</span><span class="pun" style="color: rgb(147, 161, 161);">;</span><span class="pln" style="color: rgb(72, 72, 76);"> i </span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="pln" style="color: rgb(72, 72, 76);"> strList</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">size</span><span class="pun" style="color: rgb(147, 161, 161);">();</span><span class="pln" style="color: rgb(72, 72, 76);"> i</span><span class="pun" style="color: rgb(147, 161, 161);">++)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">del </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisCluster</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">del</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">strList</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">get</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">i</span><span class="pun" style="color: rgb(147, 161, 161);">));</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">sum </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> sum </span><span class="pun" style="color: rgb(147, 161, 161);">+</span><span class="pln" style="color: rgb(72, 72, 76);"> del</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> sum</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span class="pun" style="color: rgb(147, 161, 161); background-color: rgb(255, 255, 255);"><span style="font-family: "Microsoft YaHei"; font-size: 10px;"><strong>}</strong></span></span></code></div></div>

config
<div class="linenums" style="margin: 0px; color: rgb(30, 52, 123); padding-left: 30px !important;"><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">package</span><span class="pln" style="color: rgb(72, 72, 76);"> com</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">unioncast</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">db</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">config</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> java</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">lang</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">reflect</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">Method</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> java</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">util</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">HashSet</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> java</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">util</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">Set</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">apache</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">logging</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">log4j</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">LogManager</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">apache</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">logging</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">log4j</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">Logger</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">beans</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">factory</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">annotation</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">Value</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">cache</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">CacheManager</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">cache</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">annotation</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">CachingConfigurerSupport</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">cache</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">annotation</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">EnableCaching</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">cache</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">interceptor</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">KeyGenerator</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">context</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">annotation</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">Bean</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">context</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">annotation</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">Configuration</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">context</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">annotation</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">PropertySource</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">data</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">redis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">cache</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">RedisCacheManager</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">data</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">redis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">connection</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">RedisConnectionFactory</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">data</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">redis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">connection</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">jedis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">JedisConnectionFactory</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">data</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">redis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">core</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">RedisTemplate</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">data</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">redis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">core</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">StringRedisTemplate</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> org</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">springframework</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">data</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">redis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">serializer</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">Jackson2JsonRedisSerializer</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> com</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">fasterxml</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">jackson</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">annotation</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">JsonAutoDetect</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> com</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">fasterxml</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">jackson</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">annotation</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">PropertyAccessor</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> com</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">fasterxml</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">jackson</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">databind</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">ObjectMapper</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> redis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">clients</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">jedis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">HostAndPort</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> redis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">clients</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">jedis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">JedisCluster</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> redis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">clients</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">jedis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">JedisPool</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">import</span><span class="pln" style="color: rgb(72, 72, 76);"> redis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">clients</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">jedis</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">JedisPoolConfig</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span class="lit" style="color: rgb(25, 95, 145); background-color: rgb(255, 255, 255);"><span style="font-family: "Microsoft YaHei"; font-size: 10px;"><strong>@Configuration</strong></span></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="lit" style="color: rgb(25, 95, 145);">@PropertySource</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">value </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="str" style="color: rgb(221, 17, 68);">"classpath:/redis.properties"</span><span class="pun" style="color: rgb(147, 161, 161);">)</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span class="lit" style="color: rgb(25, 95, 145); background-color: rgb(255, 255, 255);"><span style="font-family: "Microsoft YaHei"; font-size: 10px;"><strong>@EnableCaching</strong></span></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">class</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">RedisConfig</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">extends</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">CachingConfigurerSupport</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="com" style="color: rgb(147, 161, 161);">// @Value("${spring.redis.host}")</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="com" style="color: rgb(147, 161, 161);">// private String host;</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="com" style="color: rgb(147, 161, 161);">// @Value("${spring.redis.port}")</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="com" style="color: rgb(147, 161, 161);">// private int port;</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="com" style="color: rgb(147, 161, 161);">// @Value("${spring.redis.timeout}")</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="com" style="color: rgb(147, 161, 161);">// private int timeout;</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">private</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">static</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">final</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">Logger</span><span class="pln" style="color: rgb(72, 72, 76);"> LOG </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">LogManager</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">getLogger</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">RedisConfig</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="kwd" style="color: rgb(30, 52, 123);">class</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Value</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">"${spring.redis.host}"</span><span class="pun" style="color: rgb(147, 161, 161);">)</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">private</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">String</span><span class="pln" style="color: rgb(72, 72, 76);"> host</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Value</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">"${spring.redis.port}"</span><span class="pun" style="color: rgb(147, 161, 161);">)</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">private</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">int</span><span class="pln" style="color: rgb(72, 72, 76);"> port</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Value</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">"${spring.redis.timeout}"</span><span class="pun" style="color: rgb(147, 161, 161);">)</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">private</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">int</span><span class="pln" style="color: rgb(72, 72, 76);"> timeout</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Value</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">"${spring.redis.pool.max-idle}"</span><span class="pun" style="color: rgb(147, 161, 161);">)</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">private</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">int</span><span class="pln" style="color: rgb(72, 72, 76);"> maxIdle</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Value</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">"${spring.redis.pool.max-wait}"</span><span class="pun" style="color: rgb(147, 161, 161);">)</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">private</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">long</span><span class="pln" style="color: rgb(72, 72, 76);"> maxWaitMillis</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="com" style="color: rgb(147, 161, 161);">/*</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span class="com" style="color: rgb(147, 161, 161); background-color: rgb(255, 255, 255);"><span style="font-family: "Microsoft YaHei"; font-size: 10px;"><strong> * @Value("${spring.redis.password}") private String password;</strong></span></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span class="com" style="color: rgb(147, 161, 161); background-color: rgb(255, 255, 255);"><span style="font-family: "Microsoft YaHei"; font-size: 10px;"><strong> */</strong></span></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="com" style="color: rgb(147, 161, 161);">// Jedis连接池</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Bean</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JedisPool</span><span class="pln" style="color: rgb(72, 72, 76);"> redisPoolFactory</span><span class="pun" style="color: rgb(147, 161, 161);">()</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">LOG</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">info</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">"JedisPool注入成功!!"</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">LOG</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">info</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">"redis地址:"</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">+</span><span class="pln" style="color: rgb(72, 72, 76);"> host </span><span class="pun" style="color: rgb(147, 161, 161);">+</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="str" style="color: rgb(221, 17, 68);">":"</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">+</span><span class="pln" style="color: rgb(72, 72, 76);"> port</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">JedisPoolConfig</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisPoolConfig </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JedisPoolConfig</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">jedisPoolConfig</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">setMaxIdle</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">maxIdle</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">jedisPoolConfig</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">setMaxWaitMillis</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">maxWaitMillis</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="com" style="color: rgb(147, 161, 161);">// JedisPool jedisPool = new JedisPool(jedisPoolConfig, host, port,</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="com" style="color: rgb(147, 161, 161);">// timeout, password);</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">JedisPool</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisPool </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JedisPool</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">jedisPoolConfig</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> host</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> port</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> timeout</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span class="pln" style="color: rgb(72, 72, 76); background-color: rgb(255, 255, 255);"><span style="font-family: "Microsoft YaHei"; font-size: 10px;"><strong></strong></span></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisPool</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span class="pln" style="color: rgb(72, 72, 76); background-color: rgb(255, 255, 255);"><span style="font-family: "Microsoft YaHei"; font-size: 10px;"><strong></strong></span></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="com" style="color: rgb(147, 161, 161);">// JedisCluster</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Bean</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JedisCluster</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JedisClusterFactory</span><span class="pun" style="color: rgb(147, 161, 161);">()</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">LOG</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">info</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">"JedisCluster创建!!"</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">LOG</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">info</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">"redis地址:"</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">+</span><span class="pln" style="color: rgb(72, 72, 76);"> host </span><span class="pun" style="color: rgb(147, 161, 161);">+</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="str" style="color: rgb(221, 17, 68);">":"</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">+</span><span class="pln" style="color: rgb(72, 72, 76);"> port</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">Set</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">HostAndPort</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> jedisClusterNodes </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">HashSet</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">HostAndPort</span><span class="pun" style="color: rgb(147, 161, 161);">>();</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">JedisPoolConfig</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisPoolConfig </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JedisPoolConfig</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">jedisPoolConfig</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">setMaxIdle</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">maxIdle</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">jedisPoolConfig</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">setMaxWaitMillis</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">maxWaitMillis</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">jedisClusterNodes</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">add</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">HostAndPort</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">host</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> port</span><span class="pun" style="color: rgb(147, 161, 161);">));</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">JedisCluster</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisCluster </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JedisCluster</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">jedisClusterNodes</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisPoolConfig</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> jedisCluster</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Bean</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">KeyGenerator</span><span class="pln" style="color: rgb(72, 72, 76);"> wiselyKeyGenerator</span><span class="pun" style="color: rgb(147, 161, 161);">()</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">KeyGenerator</span><span class="pun" style="color: rgb(147, 161, 161);">()</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Override</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">Object</span><span class="pln" style="color: rgb(72, 72, 76);"> generate</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">Object</span><span class="pln" style="color: rgb(72, 72, 76);"> target</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">Method</span><span class="pln" style="color: rgb(72, 72, 76);"> method</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">Object</span><span class="pun" style="color: rgb(147, 161, 161);">...</span><span class="pln" style="color: rgb(72, 72, 76);"> params</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">StringBuilder</span><span class="pln" style="color: rgb(72, 72, 76);"> sb </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">StringBuilder</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">sb</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">append</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">target</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">getClass</span><span class="pun" style="color: rgb(147, 161, 161);">().</span><span class="pln" style="color: rgb(72, 72, 76);">getName</span><span class="pun" style="color: rgb(147, 161, 161);">());</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">sb</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">append</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">method</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">getName</span><span class="pun" style="color: rgb(147, 161, 161);">());</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">for</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">Object</span><span class="pln" style="color: rgb(72, 72, 76);"> obj </span><span class="pun" style="color: rgb(147, 161, 161);">:</span><span class="pln" style="color: rgb(72, 72, 76);"> params</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">sb</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">append</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">obj</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">toString</span><span class="pun" style="color: rgb(147, 161, 161);">());</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> sb</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">toString</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">};</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Bean</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JedisConnectionFactory</span><span class="pln" style="color: rgb(72, 72, 76);"> redisConnectionFactory</span><span class="pun" style="color: rgb(147, 161, 161);">()</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">JedisConnectionFactory</span><span class="pln" style="color: rgb(72, 72, 76);"> factory </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JedisConnectionFactory</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">factory</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">setHostName</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">host</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">factory</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">setPort</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">port</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">factory</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">setTimeout</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">timeout</span><span class="pun" style="color: rgb(147, 161, 161);">);</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="com" style="color: rgb(147, 161, 161);">// 设置连接超时时间</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> factory</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Bean</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">CacheManager</span><span class="pln" style="color: rgb(72, 72, 76);"> cacheManager</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">RedisTemplate</span><span class="pun" style="color: rgb(147, 161, 161);"><?,</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">?></span><span class="pln" style="color: rgb(72, 72, 76);"> redisTemplate</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">RedisCacheManager</span><span class="pln" style="color: rgb(72, 72, 76);"> cacheManager </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">RedisCacheManager</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">redisTemplate</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="com" style="color: rgb(147, 161, 161);">// Number of seconds before expiration. Defaults to unlimited (0)</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">cacheManager</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">setDefaultExpiration</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="lit" style="color: rgb(25, 95, 145);">10</span><span class="pun" style="color: rgb(147, 161, 161);">);</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="com" style="color: rgb(147, 161, 161);">// 设置key-value超时时间</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> cacheManager</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="lit" style="color: rgb(25, 95, 145);">@Bean</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">RedisTemplate</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">String</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">String</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> redisTemplate</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">RedisConnectionFactory</span><span class="pln" style="color: rgb(72, 72, 76);"> factory</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">StringRedisTemplate</span><span class="pln" style="color: rgb(72, 72, 76);"> template </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">StringRedisTemplate</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">factory</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">setSerializer</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">template</span><span class="pun" style="color: rgb(147, 161, 161);">);</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="com" style="color: rgb(147, 161, 161);">// 设置序列化工具,这样ReportBean不需要实现Serializable接口</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">template</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">afterPropertiesSet</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">return</span><span class="pln" style="color: rgb(72, 72, 76);"> template</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong> </strong></span></code></div><div class="L5" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="kwd" style="color: rgb(30, 52, 123);">private</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">void</span><span class="pln" style="color: rgb(72, 72, 76);"> setSerializer</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">StringRedisTemplate</span><span class="pln" style="color: rgb(72, 72, 76);"> template</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></strong></span></code></div><div class="L6" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">Jackson2JsonRedisSerializer</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">Object</span><span class="pun" style="color: rgb(147, 161, 161);">></span><span class="pln" style="color: rgb(72, 72, 76);"> jackson2JsonRedisSerializer </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">Jackson2JsonRedisSerializer</span><span class="pun" style="color: rgb(147, 161, 161);"><</span><span class="typ" style="color: teal;">Object</span><span class="pun" style="color: rgb(147, 161, 161);">>(</span></strong></span></code></div><div class="L7" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">Object</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="kwd" style="color: rgb(30, 52, 123);">class</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L8" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="typ" style="color: teal;">ObjectMapper</span><span class="pln" style="color: rgb(72, 72, 76);"> om </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">ObjectMapper</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></strong></span></code></div><div class="L9" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">om</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">setVisibility</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">PropertyAccessor</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">ALL</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">JsonAutoDetect</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">Visibility</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">ANY</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L0" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">om</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">enableDefaultTyping</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">ObjectMapper</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="typ" style="color: teal;">DefaultTyping</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">NON_FINAL</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L1" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">jackson2JsonRedisSerializer</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">setObjectMapper</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">om</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L2" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);">template</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">setValueSerializer</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">jackson2JsonRedisSerializer</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></strong></span></code></div><div class="L3" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span style="font-family: "Microsoft YaHei"; font-size: 10px; background-color: rgb(255, 255, 255);"><strong><span class="pln" style="color: rgb(72, 72, 76);"></span><span class="pun" style="color: rgb(147, 161, 161);">}</span></strong></span></code></div><div class="L4" style="margin: 0px; color: rgb(190, 190, 197); line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code class="language-java" style="margin: 8px 0px; word-wrap: break-word;"><span class="pun" style="color: rgb(147, 161, 161); background-color: rgb(255, 255, 255);"><span style="font-family: "Microsoft YaHei"; font-size: 10px;"><strong>}</strong></span></span></code></div></div>