All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.coolys.config.metric.CoolybotMetricsEndpointConfiguration Maven / Gradle / Ivy

Go to download

Server-side library used by applications created with the Coolybot generator, see https://www.coolybot.tech/ for more information on Coolybot

The newest version!
package io.github.coolys.config.metric;

import io.micrometer.core.annotation.Timed;
import io.micrometer.core.instrument.MeterRegistry;
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnEnabledEndpoint;
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsEndpointAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnClass(Timed.class)
@AutoConfigureAfter(MetricsEndpointAutoConfiguration.class)
public class CoolybotMetricsEndpointConfiguration {

    @Bean
    @ConditionalOnBean({MeterRegistry.class})
    @ConditionalOnMissingBean
    @ConditionalOnEnabledEndpoint
    public CoolybotMetricsEndpoint jHipsterMetricsEndpoint(MeterRegistry meterRegistry) {
        return new CoolybotMetricsEndpoint(meterRegistry);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy