redis集群配置文件

version="1.0" encoding="UTF-8"?>
"http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
    xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.2.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.2.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd">

    -- 连接redis单机版 -->
    id="jedisClientPool" class="cn.e3mall.common.jedis.JedisClientPool">
        <property name="jedisPool" ref="jedisPool">property>
    
    id="jedisPool" class="redis.clients.jedis.JedisPool">
        name="host" value="192.168.25.162"/>
        name="port" value="6379"/>
    
    -- 连接redis集群 -->
    -- 
        <property name="jedisCluster" ref="jedisCluster"/>
    
    id="jedisCluster" class="redis.clients.jedis.JedisCluster">
        name="nodes">
            <set>
                class="redis.clients.jedis.HostAndPort">
                    name="host" value="192.168.25.162">
                    name="port" value="7001">
                 
                class="redis.clients.jedis.HostAndPort">
                    name="host" value="192.168.25.162">
                    name="port" value="7002">
                 
                class="redis.clients.jedis.HostAndPort">
                    name="host" value="192.168.25.162">
                    name="port" value="7003">
                 
                class="redis.clients.jedis.HostAndPort">
                    name="host" value="192.168.25.162">
                    name="port" value="7004">
                 
                class="redis.clients.jedis.HostAndPort">
                    name="host" value="192.168.25.162">
                    name="port" value="7005">
                 
                class="redis.clients.jedis.HostAndPort">
                    name="host" value="192.168.25.162">
                    name="port" value="7006">
                 
            set>
        
     -->

你可能感兴趣的:(redis集群配置文件)