When the redis bean is injected into the spring container, the IP and port are injected using the constructor, and the password is injected using the setting method:
<bean id="zwy_redisJedisShardInfo" class="redis.clients.jedis.JedisShardInfo">
<constructor-arg name="host" value="*.*.*.*" />
<constructor-arg name="port" value="*" />
<property name="password" value="*"></property>
</bean>
<constructor-arg>: Constructor injection
<property>: setting injection
About redis read xml configuration test: