Document that username and password are not used when Redis url is set

Closes gh-41231
This commit is contained in:
Moritz Halbritter
2024-08-09 14:10:20 +02:00
parent 0fc06b50f3
commit 7386908ce0

View File

@@ -55,6 +55,20 @@ You can specify custom connection details using `spring.data.redis.*` properties
password: "secret"
----
You can also specify the url of the Redis server directly.
When setting the url, the host, port, username and password properties are ignored.
This is shown in the following example:
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
----
spring:
data:
redis:
url: "redis://user:secret@localhost:6379"
database: 0
----
TIP: You can also register an arbitrary number of beans that implement `LettuceClientConfigurationBuilderCustomizer` for more advanced customizations.
`ClientResources` can also be customized using `ClientResourcesBuilderCustomizer`.
If you use Jedis, `JedisClientConfigurationBuilderCustomizer` is also available.