|
17 | 17 |
|
18 | 18 | import java.util.Map; |
19 | 19 |
|
20 | | -import com.couchbase.client.java.Bucket; |
| 20 | +import com.couchbase.client.java.Cluster; |
21 | 21 | import reactor.core.publisher.Flux; |
22 | 22 |
|
23 | 23 | import org.springframework.boot.actuate.autoconfigure.health.CompositeReactiveHealthIndicatorConfiguration; |
|
31 | 31 | import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; |
32 | 32 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; |
33 | 33 | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; |
34 | | -import org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveDataAutoConfiguration; |
| 34 | +import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration; |
35 | 35 | import org.springframework.context.annotation.Bean; |
36 | 36 | import org.springframework.context.annotation.Configuration; |
37 | | -import org.springframework.data.couchbase.core.RxJavaCouchbaseOperations; |
38 | 37 |
|
39 | 38 | /** |
40 | 39 | * {@link EnableAutoConfiguration Auto-configuration} for |
|
45 | 44 | * @since 2.1.0 |
46 | 45 | */ |
47 | 46 | @Configuration |
48 | | -@ConditionalOnClass({ Bucket.class, RxJavaCouchbaseOperations.class, Flux.class }) |
49 | | -@ConditionalOnBean(RxJavaCouchbaseOperations.class) |
| 47 | +@ConditionalOnClass({ Cluster.class, Flux.class }) |
| 48 | +@ConditionalOnBean(Cluster.class) |
50 | 49 | @ConditionalOnEnabledHealthIndicator("couchbase") |
51 | 50 | @AutoConfigureBefore(HealthIndicatorAutoConfiguration.class) |
52 | | -@AutoConfigureAfter(CouchbaseReactiveDataAutoConfiguration.class) |
| 51 | +@AutoConfigureAfter(CouchbaseAutoConfiguration.class) |
53 | 52 | public class CouchbaseReactiveHealthIndicatorAutoConfiguration extends |
54 | | - CompositeReactiveHealthIndicatorConfiguration<CouchbaseReactiveHealthIndicator, RxJavaCouchbaseOperations> { |
| 53 | + CompositeReactiveHealthIndicatorConfiguration<CouchbaseReactiveHealthIndicator, Cluster> { |
55 | 54 |
|
56 | | - private final Map<String, RxJavaCouchbaseOperations> couchbaseOperations; |
| 55 | + private final Map<String, Cluster> clusters; |
57 | 56 |
|
58 | 57 | public CouchbaseReactiveHealthIndicatorAutoConfiguration( |
59 | | - Map<String, RxJavaCouchbaseOperations> couchbaseOperations) { |
60 | | - this.couchbaseOperations = couchbaseOperations; |
| 58 | + Map<String, Cluster> clusters) { |
| 59 | + this.clusters = clusters; |
61 | 60 | } |
62 | 61 |
|
63 | 62 | @Bean |
64 | 63 | @ConditionalOnMissingBean(name = "couchbaseReactiveHealthIndicator") |
65 | 64 | public ReactiveHealthIndicator couchbaseReactiveHealthIndicator() { |
66 | | - return createHealthIndicator(this.couchbaseOperations); |
| 65 | + return createHealthIndicator(this.clusters); |
67 | 66 | } |
68 | 67 |
|
69 | 68 | @Override |
70 | | - protected CouchbaseReactiveHealthIndicator createHealthIndicator( |
71 | | - RxJavaCouchbaseOperations couchbaseOperations) { |
72 | | - return new CouchbaseReactiveHealthIndicator(couchbaseOperations); |
| 69 | + protected CouchbaseReactiveHealthIndicator createHealthIndicator(Cluster cluster) { |
| 70 | + return new CouchbaseReactiveHealthIndicator(cluster); |
73 | 71 | } |
74 | 72 |
|
75 | 73 | } |
0 commit comments