12345678910111213141516171819202122232425262728
import io.micrometer.core.instrument.Clock;import io.micrometer.core.instrument.logging.LoggingMeterRegistry;import io.micrometer.core.instrument.logging.LoggingRegistryConfig;import org.springframework.context.annotation.Bean;import org.springframework.stereotype.Component;import java.time.Duration;@Componentpublic class Micrometer { @Bean LoggingMeterRegistry loggingMeterRegistry() { return new LoggingMeterRegistry(new LoggingRegistryConfig() { @Override public Duration step() { return Duration.ofSeconds(30); } @Override public String get(String key) { return null; } }, Clock.SYSTEM); }}