使用xml配制reids

编程入门 行业动态 更新时间:2024-10-24 09:22:41

使用<a href=https://www.elefans.com/category/jswz/34/1770957.html style=xml配制reids"/>

使用xml配制reids

如下:

<bean id="connectionFactory"class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"> --><constructor-arg name="clusterConfig"ref="clusterConfig" /><constructor-arg name="poolConfig"ref="jedisPoolConfig" /><property name="password" value="MTIzNDU2"></property></bean><!-- 集群配置 --><bean id="clusterConfig"class="org.springframework.data.redis.connection.RedisClusterConfiguration"><property name="maxRedirects" value="3"></property><!-- 集群服务IP与端口 --><property name="clusterNodes"><set><!-- server1 --><beanclass="org.springframework.data.redis.connection.RedisNode"><constructor-arg name="host" value="127.0.0.1" /><constructor-arg name="port" value="6379" /></bean><!-- server2 --><beanclass="org.springframework.data.redis.connection.RedisNode"><constructor-arg name="host" value="127.0.0.1" /><constructor-arg name="port" value="6380" /></bean><!-- server3 --><beanclass="org.springframework.data.redis.connection.RedisNode"><constructor-arg name="host" value="127.0.0.1" /><constructor-arg name="port" value="6381" /></bean></set></property></bean>

更多推荐

使用xml配制reids

本文发布于:2023-11-15 21:33:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1606691.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:xml   reids

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!