Skip to content

Commit 506b78f

Browse files
authored
Use getHost instead of getContainerIpAddress in Redis examples
getContainerIpAddress is deprecated. Closes gh-28461
1 parent 3d39dfc commit 506b78f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spring-test/src/main/java/org/springframework/test/context/DynamicPropertySource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
*
7777
* @DynamicPropertySource
7878
* static void redisProperties(DynamicPropertyRegistry registry) {
79-
* registry.add("redis.host", redis::getContainerIpAddress);
79+
* registry.add("redis.host", redis::getHost);
8080
* registry.add("redis.port", redis::getMappedPort);
8181
* }
8282
*

src/docs/asciidoc/testing.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4295,7 +4295,7 @@ properties.
42954295
42964296
@DynamicPropertySource
42974297
static void redisProperties(DynamicPropertyRegistry registry) {
4298-
registry.add("redis.host", redis::getContainerIpAddress);
4298+
registry.add("redis.host", redis::getHost);
42994299
registry.add("redis.port", redis::getMappedPort);
43004300
}
43014301
@@ -4319,7 +4319,7 @@ properties.
43194319
@DynamicPropertySource
43204320
@JvmStatic
43214321
fun redisProperties(registry: DynamicPropertyRegistry) {
4322-
registry.add("redis.host", redis::getContainerIpAddress)
4322+
registry.add("redis.host", redis::getHost)
43234323
registry.add("redis.port", redis::getMappedPort)
43244324
}
43254325
}

0 commit comments

Comments
 (0)