|
1 | 1 | /*
|
2 |
| - * Copyright 2012-2022 the original author or authors. |
| 2 | + * Copyright 2012-2025 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
20 | 20 |
|
21 | 21 | import reactor.core.publisher.Flux;
|
22 | 22 |
|
| 23 | +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; |
23 | 24 | import org.springframework.boot.actuate.autoconfigure.health.CompositeReactiveHealthContributorConfiguration;
|
24 | 25 | import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator;
|
25 | 26 | import org.springframework.boot.actuate.data.redis.RedisReactiveHealthIndicator;
|
|
50 | 51 | public class RedisReactiveHealthContributorAutoConfiguration extends
|
51 | 52 | CompositeReactiveHealthContributorConfiguration<RedisReactiveHealthIndicator, ReactiveRedisConnectionFactory> {
|
52 | 53 |
|
53 |
| - private final Map<String, ReactiveRedisConnectionFactory> redisConnectionFactories; |
54 |
| - |
55 | 54 | RedisReactiveHealthContributorAutoConfiguration(
|
56 | 55 | Map<String, ReactiveRedisConnectionFactory> redisConnectionFactories) {
|
57 | 56 | super(RedisReactiveHealthIndicator::new);
|
58 |
| - this.redisConnectionFactories = redisConnectionFactories; |
59 | 57 | }
|
60 | 58 |
|
61 | 59 | @Bean
|
62 | 60 | @ConditionalOnMissingBean(name = { "redisHealthIndicator", "redisHealthContributor" })
|
63 |
| - public ReactiveHealthContributor redisHealthContributor() { |
64 |
| - return createContributor(this.redisConnectionFactories); |
| 61 | + public ReactiveHealthContributor redisHealthContributor(ConfigurableListableBeanFactory beanFactory) { |
| 62 | + return createContributor(beanFactory, ReactiveRedisConnectionFactory.class); |
65 | 63 | }
|
66 | 64 |
|
67 | 65 | }
|
0 commit comments