Skip to content

Commit

Permalink
Add @primary to default InMemoryMetricRepository if there is one
Browse files Browse the repository at this point in the history
  • Loading branch information
dsyer authored and wilkinsona committed May 13, 2015
1 parent 2aaf556 commit a32c530
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
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;
Expand Down Expand Up @@ -158,6 +159,7 @@ public GaugeService gaugeService(GaugeBuffers writer) {
static class LegacyMetricRepositoryConfiguration {

@Bean
@Primary
public InMemoryMetricRepository actuatorMetricRepository() {
return new InMemoryMetricRepository();
}
Expand Down

0 comments on commit a32c530

Please sign in to comment.