redis 설정값 참고 (Spring Data)
redis.properties 설정시 참고..
tuc.ss.redis.serverIp=***.***.***.***
tuc.ss.redis.serverPort=****
tuc.ss.redis.password=****
tuc.ss.redis.database=1
tuc.ss.redis.timeout=120000
tuc.ss.redis.pool=true
tuc.ss.redis.maxActive=100
tuc.ss.redis.maxIdle=50
tuc.ss.redis.minIdle=10
tuc.ss.redis.maxWait=12000
# whenExhaustedAction - WHEN_EXHAUSTED_FAIL 0, WHEN_EXHAUSTED_BLOCK 1, WHEN_EXHAUSTED_GROW 2
tuc.ss.redis.whenExhaustedAction=1
tuc.ss.redis.testOnBorrow=true
tuc.ss.redis.testOnReturn=true
tuc.ss.redis.testWhileIdle=true
tuc.ss.redis.timeBetweenEvictionRunsMillis=3600000
tuc.ss.redis.numTestsPerEvictionRun=5
tuc.ss.redis.minEvictableIdleTimeMillis=300000
tuc.ss.redis.softMinEvictableIdleTimeMillis=300000
applicationContext-redis.xml 설정시 참고...
<bean id="jedisPoolConfig_SessionServer" class="redis.clients.jedis.JedisPoolConfig" lazy-init="false">
<property name="maxActive" value="${tuc.ss.redis.maxActive}" />
<property name="maxIdle" value="${tuc.ss.redis.maxIdle}" />
<property name="minIdle" value="${tuc.ss.redis.minIdle}" />
<property name="maxWait" value="${tuc.ss.redis.maxWait}"/>
<property name="whenExhaustedAction" value="${tuc.ss.redis.whenExhaustedAction}"/>
<property name="testOnBorrow" value="${tuc.ss.redis.testOnBorrow}" />
<property name="testOnReturn" value="${tuc.ss.redis.testOnReturn}"/>
<property name="testWhileIdle" value="${tuc.ss.redis.testWhileIdle}"/>
<property name="timeBetweenEvictionRunsMillis" value="${tuc.ss.redis.timeBetweenEvictionRunsMillis}"/>
<property name="numTestsPerEvictionRun" value="${tuc.ss.redis.numTestsPerEvictionRun}"/>
<property name="minEvictableIdleTimeMillis" value="${tuc.ss.redis.minEvictableIdleTimeMillis}"/>
<property name="softMinEvictableIdleTimeMillis" value="${tuc.ss.redis.softMinEvictableIdleTimeMillis}"/>
</bean>
<bean id="jedisConnectionFactory_SessionServer" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory" lazy-init="false">
<property name="hostName" value="${tuc.ss.redis.serverIp}" />
<property name="port" value="${tuc.ss.redis.serverPort}" />
<property name="password" value="${tuc.ss.redis.password}" />
<property name="database" value="${tuc.ss.redis.database}" />
<property name="timeout" value="${tuc.ss.redis.timeout}" />
<property name="usePool" value="${tuc.ss.redis.pool}" />
<property name="poolConfig" ref="jedisPoolConfig_SessionServer" />
</bean>
<bean id="stringRedisTemplate_SessionServer" class="org.springframework.data.redis.core.StringRedisTemplate" lazy-init="false">
<property name="connectionFactory" ref="jedisConnectionFactory_SessionServer"/>
</bean>
아이피, 포트, 비밀번호는 숨김..