<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context"
       xmlns:redisson="http://redisson.org/schema/redisson"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
       http://redisson.org/schema/redisson classpath:org/redisson/spring/support/redisson-1.1.xsd
">
    <context:annotation-config />
    <context:property-placeholder system-properties-mode="OVERRIDE"/>
    
    <redisson:client id="myRedisson1" name="redisson1,redisson2" codec-ref="myCodec" >
        <redisson:single-server address="${redisAddress}" client-name="1"/>
    </redisson:client>
    
    <redisson:client id="myRedisson2" name="redisson3,redisson4">
        <redisson:single-server address="${redisAddress}" client-name="2"/>
    </redisson:client>
    
    <redisson:client>
        <qualifier value="qualifier1"/>
        <redisson:single-server address="${redisAddress}" client-name="3"/>
    </redisson:client>
    
    <redisson:client>
        <qualifier value="qualifier2"/>
        <redisson:single-server address="${redisAddress}" client-name="4"/>
    </redisson:client>
    
    <!-- Minimal requirement for redisson client-->
    <redisson:client>
        <!-- Use default address "127.0.0.1:6379" -->
        <redisson:single-server />
    </redisson:client>
    
    <redisson:client>
        <redisson:sentinel-servers master-name="myMaster">
            <redisson:sentinel-address value="${sentinel1Address}" />
            <redisson:sentinel-address value="${sentinel2Address}" />
            <redisson:sentinel-address value="${sentinel3Address}" />
        </redisson:sentinel-servers>
    </redisson:client>
    
    <redisson:client>
        <redisson:master-slave-servers master-address="${redisAddress}">
            <redisson:slave-address value="${slave1Address}" />
            <redisson:slave-address value="${slave2Address}" />
        </redisson:master-slave-servers>
    </redisson:client>
    
    <redisson:client>
        <redisson:cluster-servers>
            <redisson:node-address value="${node1Address}" />
            <redisson:node-address value="${node2Address}" />
            <redisson:node-address value="${node3Address}" />
        </redisson:cluster-servers>
    </redisson:client>

    <redisson:client>
        <redisson:replicated-servers read-mode="MASTER_SLAVE" >
            <redisson:node-address value="${redisAddress}" />
            <redisson:node-address value="${slave1Address}" />
            <redisson:node-address value="${slave2Address}" />
        </redisson:replicated-servers>
    </redisson:client>
    
    <!-- Minimal requirement for redis client-->
    <!-- Use default host 127.0.0.1 and port 6379 -->
    <redisson:redis />

    <bean id="myCodec" class="org.redisson.codec.MsgPackJacksonCodec" />
    
    <bean class="org.redisson.spring.support.SpringNamespaceTest.AutowireRedisson" />
    <bean class="org.redisson.spring.support.SpringNamespaceTest.AutowireRedis" />
</beans>
