diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index da660157fe..9c02d6075b 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -17,6 +17,7 @@
+
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index f882ae2746..20d0f1e3d8 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -43,6 +43,8 @@
+
+
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index f04507a101..9f239e4965 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -1,6 +1,11 @@
+
+
+
+
+
@@ -11,6 +16,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/jpa-buddy.xml b/.idea/jpa-buddy.xml
new file mode 100644
index 0000000000..898e07a675
--- /dev/null
+++ b/.idea/jpa-buddy.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/php.xml b/.idea/php.xml
new file mode 100644
index 0000000000..f5f27444bd
--- /dev/null
+++ b/.idea/php.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/persistence-modules/pom.xml b/persistence-modules/pom.xml
index c0467cdee2..86b2acfa1b 100644
--- a/persistence-modules/pom.xml
+++ b/persistence-modules/pom.xml
@@ -76,7 +76,7 @@
-
+ spring-data-redis
diff --git a/persistence-modules/spring-data-redis/README.md b/persistence-modules/spring-data-redis/README.md
new file mode 100644
index 0000000000..6ad9a28797
--- /dev/null
+++ b/persistence-modules/spring-data-redis/README.md
@@ -0,0 +1,16 @@
+## Spring Data Redis
+
+### 相关文章:
+- [Introduction to Spring Data Redis](https://www.baeldung.com/spring-data-redis-tutorial)
+- [PubSub Messaging with Spring Data Redis](https://www.baeldung.com/spring-data-redis-pub-sub)
+- [An Introduction to Spring Data Redis Reactive](https://www.baeldung.com/spring-data-redis-reactive)
+
+### 构建项目并且运行所有的测试
+```
+mvn clean install
+```
+
+### 只运行测试
+```
+mvn test
+```
diff --git a/persistence-modules/spring-data-redis/pom.xml b/persistence-modules/spring-data-redis/pom.xml
new file mode 100644
index 0000000000..aacb2b7042
--- /dev/null
+++ b/persistence-modules/spring-data-redis/pom.xml
@@ -0,0 +1,93 @@
+
+
+ 4.0.0
+ spring-data-redis
+ 1.0
+ spring-data-redis
+ jar
+
+
+ com.ossez
+ parent-boot-2
+ 0.0.2-SNAPSHOT
+ ../../parent-boot-2
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis-reactive
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.projectlombok
+ lombok
+
+
+ io.projectreactor
+ reactor-test
+ test
+
+
+ org.springframework
+ spring-test
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.junit.platform
+ junit-platform-runner
+ test
+
+
+ cglib
+ cglib-nodep
+ ${cglib.version}
+
+
+ redis.clients
+ jedis
+ jar
+
+
+ com.lordofthejars
+ nosqlunit-redis
+ ${nosqlunit.version}
+
+
+ com.github.kstyrc
+ embedded-redis
+ ${embedded-redis.version}
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ true
+ false
+ 0
+ -Xmx1024m
+
+
+
+
+
+
+ 3.2.4
+ 0.10.0
+ 0.6
+
+
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/reactive/redis/SpringRedisReactiveApplication.java b/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/reactive/redis/SpringRedisReactiveApplication.java
new file mode 100644
index 0000000000..8b1f892f67
--- /dev/null
+++ b/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/reactive/redis/SpringRedisReactiveApplication.java
@@ -0,0 +1,13 @@
+package com.baeldung.spring.data.reactive.redis;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class SpringRedisReactiveApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(SpringRedisReactiveApplication.class, args);
+ }
+
+}
diff --git a/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/reactive/redis/config/RedisConfig.java b/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/reactive/redis/config/RedisConfig.java
new file mode 100644
index 0000000000..de8e447ef8
--- /dev/null
+++ b/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/reactive/redis/config/RedisConfig.java
@@ -0,0 +1,51 @@
+package com.baeldung.spring.data.reactive.redis.config;
+
+
+import com.baeldung.spring.data.reactive.redis.model.Employee;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.ReactiveKeyCommands;
+import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory;
+import org.springframework.data.redis.connection.ReactiveStringCommands;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.core.ReactiveRedisTemplate;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializationContext;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+import javax.annotation.PreDestroy;
+
+@Configuration
+public class RedisConfig {
+
+ @Autowired
+ RedisConnectionFactory factory;
+
+ @Bean
+ public ReactiveRedisTemplate reactiveRedisTemplate(ReactiveRedisConnectionFactory factory) {
+ Jackson2JsonRedisSerializer serializer = new Jackson2JsonRedisSerializer<>(Employee.class);
+ RedisSerializationContext.RedisSerializationContextBuilder builder = RedisSerializationContext.newSerializationContext(new StringRedisSerializer());
+ RedisSerializationContext context = builder.value(serializer)
+ .build();
+ return new ReactiveRedisTemplate<>(factory, context);
+ }
+
+ @Bean
+ public ReactiveKeyCommands keyCommands(final ReactiveRedisConnectionFactory reactiveRedisConnectionFactory) {
+ return reactiveRedisConnectionFactory.getReactiveConnection()
+ .keyCommands();
+ }
+
+ @Bean
+ public ReactiveStringCommands stringCommands(final ReactiveRedisConnectionFactory reactiveRedisConnectionFactory) {
+ return reactiveRedisConnectionFactory.getReactiveConnection()
+ .stringCommands();
+ }
+
+ @PreDestroy
+ public void cleanRedis() {
+ factory.getConnection()
+ .flushDb();
+ }
+}
diff --git a/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/reactive/redis/model/Employee.java b/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/reactive/redis/model/Employee.java
new file mode 100644
index 0000000000..9178f6e112
--- /dev/null
+++ b/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/reactive/redis/model/Employee.java
@@ -0,0 +1,21 @@
+package com.baeldung.spring.data.reactive.redis.model;
+
+import java.io.Serializable;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.ToString;
+
+@Data
+@ToString
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode
+public class Employee implements Serializable {
+ private static final long serialVersionUID = 1603714798906422731L;
+ private String id;
+ private String name;
+ private String department;
+}
diff --git a/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/SpringRedisApplication.java b/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/SpringRedisApplication.java
new file mode 100644
index 0000000000..82c06f803b
--- /dev/null
+++ b/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/SpringRedisApplication.java
@@ -0,0 +1,13 @@
+package com.baeldung.spring.data.redis;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class SpringRedisApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(SpringRedisApplication.class, args);
+ }
+
+}
diff --git a/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/config/RedisConfig.java b/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/config/RedisConfig.java
new file mode 100644
index 0000000000..7fd13d2777
--- /dev/null
+++ b/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/config/RedisConfig.java
@@ -0,0 +1,60 @@
+package com.baeldung.spring.data.redis.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.listener.ChannelTopic;
+import org.springframework.data.redis.listener.RedisMessageListenerContainer;
+import org.springframework.data.redis.listener.adapter.MessageListenerAdapter;
+import org.springframework.data.redis.repository.configuration.EnableRedisRepositories;
+import org.springframework.data.redis.serializer.GenericToStringSerializer;
+
+import com.baeldung.spring.data.redis.queue.MessagePublisher;
+import com.baeldung.spring.data.redis.queue.RedisMessagePublisher;
+import com.baeldung.spring.data.redis.queue.RedisMessageSubscriber;
+
+@Configuration
+@ComponentScan("com.baeldung.spring.data.redis")
+@EnableRedisRepositories(basePackages = "com.baeldung.spring.data.redis.repo")
+@PropertySource("classpath:application.properties")
+public class RedisConfig {
+
+ @Bean
+ JedisConnectionFactory jedisConnectionFactory() {
+ return new JedisConnectionFactory();
+ }
+
+ @Bean
+ public RedisTemplate redisTemplate() {
+ final RedisTemplate template = new RedisTemplate();
+ template.setConnectionFactory(jedisConnectionFactory());
+ template.setValueSerializer(new GenericToStringSerializer