Merge pull request #12725 from izeye:destroy-method

* pr/12725:
  Remove destroyMethod attribute in @Bean for MeterRegistry
pull/12683/merge
Stephane Nicoll 7 years ago
commit 958f3d5bf5

@ -142,7 +142,7 @@ public class AtlasMetricsExportAutoConfigurationTests {
@Import(BaseConfiguration.class)
static class CustomRegistryConfiguration {
@Bean(destroyMethod = "stop")
@Bean
public AtlasMeterRegistry customRegistry(AtlasConfig config, Clock clock) {
return new AtlasMeterRegistry(config, clock);
}

@ -154,7 +154,7 @@ public class DatadogMetricsExportAutoConfigurationTests {
@Import(BaseConfiguration.class)
static class CustomRegistryConfiguration {
@Bean(destroyMethod = "stop")
@Bean
public DatadogMeterRegistry customRegistry(DatadogConfig config, Clock clock) {
return new DatadogMeterRegistry(config, clock);
}

@ -142,7 +142,7 @@ public class GangliaMetricsExportAutoConfigurationTests {
@Import(BaseConfiguration.class)
static class CustomRegistryConfiguration {
@Bean(destroyMethod = "stop")
@Bean
public GangliaMeterRegistry customRegistry(GangliaConfig config, Clock clock) {
return new GangliaMeterRegistry(config, clock);
}

@ -145,7 +145,7 @@ public class GraphiteMetricsExportAutoConfigurationTests {
@Import(BaseConfiguration.class)
static class CustomRegistryConfiguration {
@Bean(destroyMethod = "stop")
@Bean
public GraphiteMeterRegistry customRegistry(GraphiteConfig config, Clock clock) {
return new GraphiteMeterRegistry(config, clock);
}

@ -142,7 +142,7 @@ public class InfluxMetricsExportAutoConfigurationTests {
@Import(BaseConfiguration.class)
static class CustomRegistryConfiguration {
@Bean(destroyMethod = "stop")
@Bean
public InfluxMeterRegistry customRegistry(InfluxConfig config, Clock clock) {
return new InfluxMeterRegistry(config, clock);
}

@ -158,7 +158,7 @@ public class JmxMetricsExportAutoConfigurationTests {
@Import(BaseConfiguration.class)
static class CustomRegistryConfiguration {
@Bean(destroyMethod = "stop")
@Bean
public JmxMeterRegistry customRegistry(JmxConfig config, Clock clock) {
return new JmxMeterRegistry(config, clock);
}

@ -172,7 +172,7 @@ public class NewRelicMetricsExportAutoConfigurationTests {
@Import(BaseConfiguration.class)
static class CustomRegistryConfiguration {
@Bean(destroyMethod = "stop")
@Bean
public NewRelicMeterRegistry customRegistry(NewRelicConfig config, Clock clock) {
return new NewRelicMeterRegistry(config, clock);
}

@ -164,7 +164,7 @@ public class SignalFxMetricsExportAutoConfigurationTests {
@Import(BaseConfiguration.class)
static class CustomRegistryConfiguration {
@Bean(destroyMethod = "stop")
@Bean
public SignalFxMeterRegistry customRegistry(SignalFxConfig config, Clock clock) {
return new SignalFxMeterRegistry(config, clock);
}

@ -160,7 +160,7 @@ public class StatsdMetricsExportAutoConfigurationTests {
@Import(BaseConfiguration.class)
static class CustomRegistryConfiguration {
@Bean(destroyMethod = "stop")
@Bean
public StatsdMeterRegistry customRegistry(StatsdConfig config, Clock clock) {
return new StatsdMeterRegistry(config, clock);
}

@ -146,7 +146,7 @@ public class WavefrontMetricsExportAutoConfigurationTests {
@Import(BaseConfiguration.class)
static class CustomRegistryConfiguration {
@Bean(destroyMethod = "stop")
@Bean
public WavefrontMeterRegistry customRegistry(WavefrontConfig config,
Clock clock) {
return new WavefrontMeterRegistry(config, clock);

Loading…
Cancel
Save