Commit a32c530c authored by Dave Syer's avatar Dave Syer Committed by Andy Wilkinson

Add @Primary to default InMemoryMetricRepository if there is one

parent 2aaf556a
...@@ -47,6 +47,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; ...@@ -47,6 +47,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.messaging.MessageChannel; import org.springframework.messaging.MessageChannel;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
...@@ -158,6 +159,7 @@ public class MetricRepositoryAutoConfiguration { ...@@ -158,6 +159,7 @@ public class MetricRepositoryAutoConfiguration {
static class LegacyMetricRepositoryConfiguration { static class LegacyMetricRepositoryConfiguration {
@Bean @Bean
@Primary
public InMemoryMetricRepository actuatorMetricRepository() { public InMemoryMetricRepository actuatorMetricRepository() {
return new InMemoryMetricRepository(); return new InMemoryMetricRepository();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment