|
16 | 16 |
|
17 | 17 | <section id="redis:requirements">
|
18 | 18 | <title>Redis Requirements</title>
|
19 |
| - <para>Spring Redis requires Redis 2.0 or above (Redis 2.2 is recommended) and Java SE 6.0 or above. |
| 19 | + <para>Spring Redis requires Redis 2.0 or above and Java SE 5.0 or above . |
20 | 20 | In terms of language bindings (or connectors), Spring Redis integrates with <ulink url="http://github.com/xetorthio/jedis">Jedis</ulink>,
|
21 |
| - <ulink url="http://github.com/alphazero/jredis">JRedis</ulink> and <ulink url="http://github.com/e-mzungu/rjc">RJC</ulink>, three popular open source Java libraries for Redis. |
| 21 | + <ulink url="http://github.com/alphazero/jredis">JRedis</ulink>, <ulink url="http://github.com/e-mzungu/rjc">RJC</ulink>, |
| 22 | + <ulink url="http://github.com/spullara/redis-protocol">SRP</ulink> and |
| 23 | + <ulink url="http://github.com/wg/lettuce">Lettuce</ulink>, five popular open source Java libraries for Redis. |
22 | 24 | If you are aware of any other connector that we should be integrating is, please send us feedback.
|
23 | 25 | </para>
|
24 | 26 | </section>
|
|
45 | 47 | <section id="redis:connectors">
|
46 | 48 | <title>Connecting to Redis</title>
|
47 | 49 |
|
48 |
| - <para>One of the first tasks when using Redis and Spring is to connect to the store through the IoC container. To do that, a Java connector (or binding) is required; |
49 |
| - currently Spring Redis has support for Jedis and JRedis. No matter the library one chooses, there only one set of Spring Redis API that one needs to use that behaves consistently |
| 50 | + <para>One of the first tasks when using Redis and Spring is to connect to the store through the IoC container. To do that, a Java connector (or binding) is required. |
| 51 | + No matter the library one chooses, there only one set of Spring Redis API that one needs to use that behaves consistently |
50 | 52 | across all connectors, namely the <literal>org.springframework.data.redis.connection</literal> package and its
|
51 | 53 | <interfacename>RedisConnection</interfacename> and <interfacename>RedisConnectionFactory</interfacename> interfaces for working respectively for retrieving active
|
52 | 54 | <literal>connection</literal> to Redis.</para>
|
|
182 | 184 | <para><ulink url="https://github.com/spullara/redis-protocol">SRP</ulink> (an acronym for Sam's Redis Protocol) is the forth, open-source connector supported by
|
183 | 185 | Spring Redis through the <literal>org.springframework.data.redis.connection.srp</literal> package.</para>
|
184 | 186 |
|
185 |
| - <para>By now, its configuration is probably easy to guess::</para> |
| 187 | + <para>By now, its configuration is probably easy to guess:</para> |
186 | 188 |
|
187 | 189 | <programlisting language="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
|
188 | 190 | <beans xmlns="http://www.springframework.org/schema/beans"
|
|
196 | 198 | </beans>]]></programlisting>
|
197 | 199 |
|
198 | 200 | <para>Needless to say, the configuration is quite similar to that of the other connectors.</para>
|
199 |
| - |
| 201 | + </section> |
| 202 | + |
| 203 | + <section id="redis:connectors:lettuce"> |
| 204 | + <title>Configuring Lettuce connector</title> |
| 205 | + |
| 206 | + <para><ulink url="https://github.com/wg/lettuce">Lettuce</ulink> is the fifth, open-source connector supported by |
| 207 | + Spring Redis through the <literal>org.springframework.data.redis.connection.lettuce</literal> package.</para> |
| 208 | + |
| 209 | + <para>Its configuration is probably easy to guess:</para> |
| 210 | + |
| 211 | + <programlisting language="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?> |
| 212 | +<beans xmlns="http://www.springframework.org/schema/beans" |
| 213 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 214 | + xmlns:p="http://www.springframework.org/schema/p" |
| 215 | + xsi:schemaLocation=" |
| 216 | + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> |
| 217 | + |
| 218 | + <bean id="srpConnectionFactory" class="org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory" |
| 219 | + p:host-name="server" p:port="6379"/> |
| 220 | +</beans>]]></programlisting> |
| 221 | + |
| 222 | + <para>Needless to say, the configuration is quite similar to that of the other connectors.</para> |
200 | 223 | </section>
|
201 | 224 |
|
202 | 225 | </section>
|
|
0 commit comments