Skip to content

Commit 7386908

Browse files
committed
Document that username and password are not used when Redis url is set
Closes gh-41231
1 parent 0fc06b5 commit 7386908

File tree

1 file changed

+14
-0
lines changed
  • spring-boot-project/spring-boot-docs/src/docs/asciidoc/data

1 file changed

+14
-0
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/data/nosql.adoc

+14
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,20 @@ You can specify custom connection details using `spring.data.redis.*` properties
5555
password: "secret"
5656
----
5757

58+
You can also specify the url of the Redis server directly.
59+
When setting the url, the host, port, username and password properties are ignored.
60+
This is shown in the following example:
61+
62+
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
63+
----
64+
spring:
65+
data:
66+
redis:
67+
url: "redis://user:secret@localhost:6379"
68+
database: 0
69+
----
70+
71+
5872
TIP: You can also register an arbitrary number of beans that implement `LettuceClientConfigurationBuilderCustomizer` for more advanced customizations.
5973
`ClientResources` can also be customized using `ClientResourcesBuilderCustomizer`.
6074
If you use Jedis, `JedisClientConfigurationBuilderCustomizer` is also available.

0 commit comments

Comments
 (0)