From 5a0f1bbe9b10099ab39a4d972d10c7acd1f0d60f Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 21 Jul 2023 14:47:54 +0100 Subject: [PATCH] Polish "Correct description of overrides for spring.redis.url" See gh-36477 --- .../boot/autoconfigure/data/redis/RedisProperties.java | 2 +- .../data/redis/RedisAutoConfigurationTests.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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 b767cfa518..8b707c038a 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. 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 c779d02b5e..a0d3ed0f4a 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 @@ -139,8 +139,9 @@ class RedisAutoConfigurationTests { @Test void testOverrideUrlRedisConfiguration() { this.contextRunner - .withPropertyValues("spring.redis.host:foo", "spring.redis.password:xyz", "spring.redis.port:1000", - "spring.redis.ssl:false", "spring.redis.url:rediss://user:password@example:33") + .withPropertyValues("spring.redis.host:foo", "spring.redis.user:alice", "spring.redis.password:xyz", + "spring.redis.port:1000", "spring.redis.ssl:false", + "spring.redis.url:rediss://user:password@example:33") .run((context) -> { LettuceConnectionFactory cf = context.getBean(LettuceConnectionFactory.class); assertThat(cf.getHostName()).isEqualTo("example");