mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Add @Primary to default InMemoryMetricRepository if there is one
This commit is contained in:
parent
2aaf556a1c
commit
a32c530c36
@ -47,6 +47,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
@ -158,6 +159,7 @@ public class MetricRepositoryAutoConfiguration {
|
||||
static class LegacyMetricRepositoryConfiguration {
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
public InMemoryMetricRepository actuatorMetricRepository() {
|
||||
return new InMemoryMetricRepository();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user