Skip to content

Document more clearly that username and password are not used when spring.data.redis.url is set #41231

@alexisgayte

Description

@alexisgayte

https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/PropertiesRedisConnectionDetails.java#L41

Configuration via URL doesn't allow username and password to be passed separately.
This is problematic in a prod environment where these data need to be encrypted.

I know there is a workaround : using params directly however if I recall Lettuce allows it.
The fix would be if username is null/empty try to pick the param.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions