From e8e200dde0b8599ebb9ce41c1ef889e63c06e190 Mon Sep 17 00:00:00 2001 From: zhangwt Date: Wed, 18 Oct 2023 09:12:00 +0800 Subject: [PATCH] docs #26: Add Spring Boot docs about Redis configuration --- README.adoc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.adoc b/README.adoc index 1e60c70..6e5c11d 100644 --- a/README.adoc +++ b/README.adoc @@ -101,6 +101,32 @@ NOTE: You can also fork the project from Github and open it in your IDE or other == Create a Redis Message Receiver +Redis configuration two file formats + +- properties +==== +[source,text] +---- +spring.redis.host=localhost +spring.redis.port=6379 +spring.redis.password=123456 +spring.redis.database=0 +---- +==== + +- yaml +==== +[source,yaml] +---- +spring: + redis: + host: localhost + port: 6379 + password: 123456 + database: 0 +---- +==== + In any messaging-based application, there are message publishers and messaging receivers. To create the message receiver, implement a receiver with a method to respond to messages, as the following example (from `src/main/java/com/example/messagingredis/Receiver.java`)