want to configure this redis-context.xml file into .java class and it should take single string of comma separated list of IPs.
<bean id="jedisConnFactory"
class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory">
<constructor-arg name="sentinelConfig" ref="redisSentinelConfiguration"/>
<property name="password" value="${redis.password}" />
<property name="database" value="${redis.index}"/>
</bean>
<bean id="redisSentinelConfiguration" class="org.springframework.data.redis.connection.RedisSentinelConfiguration">
<constructor-arg name="master" value="${redis.master.name}"/>
<constructor-arg name="sentinelHostAndPorts">
<set>
<value>${redis.host1}:${redis.sentinel.port1}</value>
<value>${redis.host2}:${redis.sentinel.port2}</value>
<value>${redis.host3}:${redis.sentinel.port3}</value>
</set>
</constructor-arg>
</bean>
<bean id="redisJSONSerializer" class="org.springframework.data.redis.serializer.JdkSerializationRedisSerializer"/>
<!-- redis template definition -->
<bean id="redisTemplate"
class="org.springframework.data.redis.core.RedisTemplate"
p:connectionFactory-ref="jedisConnFactory"
p:valueSerializer-ref="redisJSONSerializer"/>