Skip to content

Commit ca49139

Browse files
mp911dechristophstrobl
authored andcommitted
Update docs.
Also, refine docs regarding driver ordering. Original Pull Request: #2287
1 parent f232a5b commit ca49139

File tree

4 files changed

+25
-21
lines changed

4 files changed

+25
-21
lines changed

src/main/asciidoc/new-features.adoc

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33

44
This section briefly covers items that are new and noteworthy in the latest releases.
55

6-
[[new-in-2.7.0]]
6+
[[new-in-3.0.0]]
7+
== New in Spring Data Redis 3.0
8+
9+
* Upgrade to Jedis 4.1. Jedis 4 imposes certain limitations on transactions and pipelines and commands used in pipelines/transactions, see <<redis:connectors:overview>>.
10+
11+
712
== New in Spring Data Redis 2.7
813

914
* Sentinel ACL authentication considering a sentinel-specific username. Setting a username enables username and password authentication requiring Redis 6.

src/main/asciidoc/reference/redis-cluster.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class AppConfig {
4747
4848
public @Bean RedisConnectionFactory connectionFactory() {
4949
50-
return new JedisConnectionFactory(
50+
return new LettuceConnectionFactory(
5151
new RedisClusterConfiguration(clusterProperties.getNodes()));
5252
}
5353
}

src/main/asciidoc/reference/redis-repositories.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class ApplicationConfig {
5858
5959
@Bean
6060
public RedisConnectionFactory connectionFactory() {
61-
return new JedisConnectionFactory();
61+
return new LettuceConnectionFactory();
6262
}
6363
6464
@Bean
@@ -843,10 +843,10 @@ class RedisOperationsProducer {
843843
@Produces
844844
RedisConnectionFactory redisConnectionFactory() {
845845
846-
JedisConnectionFactory jedisConnectionFactory = new JedisConnectionFactory(new RedisStandaloneConfiguration());
847-
jedisConnectionFactory.afterPropertiesSet();
846+
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(new RedisStandaloneConfiguration());
847+
connectionFactory.afterPropertiesSet();
848848
849-
return jedisConnectionFactory;
849+
return connectionFactory;
850850
}
851851
852852
void disposeRedisConnectionFactory(@Disposes RedisConnectionFactory redisConnectionFactory) throws Exception {

src/main/asciidoc/reference/redis.adoc

+14-15
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Unfortunately, currently, not all connectors support all Redis features. When in
118118

119119
| Other Connection Features
120120
| Singleton-connection sharing for non-blocking commands
121-
| `JedisShardInfo` support
121+
| Pipelining and Transactions mutually exclusive. Cannot use server/connection commands in pipeline/transactions.
122122

123123
| SSL Support
124124
| X
@@ -130,11 +130,11 @@ Unfortunately, currently, not all connectors support all Redis features. When in
130130

131131
| <<pipeline,Pipelining>>
132132
| X
133-
| X
133+
| X (Pipelining and Transactions mutually exclusive)
134134

135135
| <<tx,Transactions>>
136136
| X
137-
| X
137+
| X (Pipelining and Transactions mutually exclusive)
138138

139139
| Datatype support
140140
| Key, String, List, Set, Sorted Set, Hash, Server, Stream, Scripting, Geo, HyperLogLog
@@ -204,7 +204,7 @@ NOTE: Netty currently supports the epoll (Linux) and kqueue (BSD/macOS) interfac
204204
[[redis:connectors:jedis]]
205205
=== Configuring the Jedis Connector
206206

207-
https://github.com/xetorthio/jedis[Jedis] is a community-driven connector supported by the Spring Data Redis module through the `org.springframework.data.redis.connection.jedis` package.
207+
https://github.com/redis/jedis[Jedis] is a community-driven connector supported by the Spring Data Redis module through the `org.springframework.data.redis.connection.jedis` package.
208208

209209

210210
.Add the following to the pom.xml files `dependencies` element:
@@ -223,7 +223,6 @@ https://github.com/xetorthio/jedis[Jedis] is a community-driven connector suppor
223223
</dependencies>
224224
----
225225

226-
227226
In its simplest form, the Jedis configuration looks as follow:
228227

229228
[source,java]
@@ -288,27 +287,27 @@ For dealing with high-availability Redis, Spring Data Redis has support for http
288287
[source,java]
289288
----
290289
/**
291-
* Jedis
290+
* Lettuce
292291
*/
293292
@Bean
294-
public RedisConnectionFactory jedisConnectionFactory() {
293+
public RedisConnectionFactory lettuceConnectionFactory() {
295294
RedisSentinelConfiguration sentinelConfig = new RedisSentinelConfiguration()
296295
.master("mymaster")
297296
.sentinel("127.0.0.1", 26379)
298297
.sentinel("127.0.0.1", 26380);
299-
return new JedisConnectionFactory(sentinelConfig);
298+
return new LettuceConnectionFactory(sentinelConfig);
300299
}
301300
302301
/**
303-
* Lettuce
302+
* Jedis
304303
*/
305304
@Bean
306-
public RedisConnectionFactory lettuceConnectionFactory() {
305+
public RedisConnectionFactory jedisConnectionFactory() {
307306
RedisSentinelConfiguration sentinelConfig = new RedisSentinelConfiguration()
308307
.master("mymaster")
309308
.sentinel("127.0.0.1", 26379)
310309
.sentinel("127.0.0.1", 26380);
311-
return new LettuceConnectionFactory(sentinelConfig);
310+
return new JedisConnectionFactory(sentinelConfig);
312311
}
313312
----
314313

@@ -400,9 +399,9 @@ For cases where you need a certain template view, declare the view as a dependen
400399
xmlns:p="http://www.springframework.org/schema/p"
401400
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
402401
403-
<bean id="jedisConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory" p:use-pool="true"/>
402+
<bean id="redisConnectionFactory" class="org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory"/>
404403
<!-- redis template definition -->
405-
<bean id="redisTemplate" class="org.springframework.data.redis.core.RedisTemplate" p:connection-factory-ref="jedisConnectionFactory"/>
404+
<bean id="redisTemplate" class="org.springframework.data.redis.core.RedisTemplate" p:connection-factory-ref="redisConnectionFactory"/>
406405
...
407406
408407
</beans>
@@ -439,9 +438,9 @@ Since it is quite common for the keys and values stored in Redis to be `java.lan
439438
xmlns:p="http://www.springframework.org/schema/p"
440439
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
441440
442-
<bean id="jedisConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory" p:use-pool="true"/>
441+
<bean id="redisConnectionFactory" class="org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory"/>
443442
444-
<bean id="stringRedisTemplate" class="org.springframework.data.redis.core.StringRedisTemplate" p:connection-factory-ref="jedisConnectionFactory"/>
443+
<bean id="stringRedisTemplate" class="org.springframework.data.redis.core.StringRedisTemplate" p:connection-factory-ref="redisConnectionFactory"/>
445444
...
446445
</beans>
447446
----

0 commit comments

Comments
 (0)