mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-25 02:49:03 +00:00
Merge pull request #12725 from izeye:destroy-method
* pr/12725: Remove destroyMethod attribute in @Bean for MeterRegistry
This commit is contained in:
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user