diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisProperties.java index 7ceb073b4a8..826632f5f6e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ public class RedisProperties { private int database = 0; /** - * Connection URL. Overrides host, port, and password. User is ignored. Example: + * Connection URL. Overrides host, port, username, and password. Example: * redis://user:password@example.com:6379 */ private String url; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationTests.java index e1ffb9baaa4..48910aaec96 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationTests.java @@ -138,8 +138,8 @@ class RedisAutoConfigurationTests { @Test void testOverrideUrlRedisConfiguration() { this.contextRunner - .withPropertyValues("spring.data.redis.host:foo", "spring.data.redis.password:xyz", - "spring.data.redis.port:1000", "spring.data.redis.ssl:false", + .withPropertyValues("spring.data.redis.host:foo", "spring.redis.data.user:alice", + "spring.data.redis.password:xyz", "spring.data.redis.port:1000", "spring.data.redis.ssl:false", "spring.data.redis.url:rediss://user:password@example:33") .run((context) -> { LettuceConnectionFactory cf = context.getBean(LettuceConnectionFactory.class);