Skip to content

Commit 0743da4

Browse files
committed
Merge branch '3.0.x'
Closes gh-35546
2 parents 59a4018 + d6a1a3d commit 0743da4

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinConfigurations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ ZipkinWebClientSender webClientSender(ZipkinProperties properties,
127127
static class ReporterConfiguration {
128128

129129
@Bean
130-
@ConditionalOnMissingBean
130+
@ConditionalOnMissingBean(Reporter.class)
131131
@ConditionalOnBean(Sender.class)
132132
AsyncReporter<Span> spanReporter(Sender sender, BytesEncoder<Span> encoder) {
133133
return AsyncReporter.builder(sender).build(encoder);

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinConfigurationsReporterConfigurationTests.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ void shouldNotSupplyReporterIfSenderIsMissing() {
5656

5757
@Test
5858
void shouldBackOffOnCustomBeans() {
59-
this.contextRunner.withUserConfiguration(CustomConfiguration.class).run((context) -> {
60-
assertThat(context).hasBean("customReporter");
61-
assertThat(context).hasSingleBean(Reporter.class);
62-
});
59+
this.contextRunner.withUserConfiguration(SenderConfiguration.class, CustomConfiguration.class)
60+
.run((context) -> {
61+
assertThat(context).hasBean("customReporter");
62+
assertThat(context).hasSingleBean(Reporter.class);
63+
});
6364
}
6465

6566
@Configuration(proxyBeanMethods = false)

0 commit comments

Comments
 (0)