package it.micegroup.gestioneferie.configurazionepf.config;

import it.micegroup.gestioneferie.configurazionepf.actuator.GestioneferieMsConfigurazionepfInterceptor;
import it.micegroup.gestioneferie.configurazionepf.actuator.GestioneferieMsConfigurazionepfProperties;
import io.micrometer.core.instrument.MeterRegistry;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.handler.MappedInterceptor;

@EnableConfigurationProperties(GestioneferieMsConfigurazionepfProperties.class)
@Configuration
public class GestioneferieMsConfigurazionepfConfig {
	@Bean
	public MappedInterceptor metricInterceptor(MeterRegistry registry) {
		return new MappedInterceptor(new String[] { "/**" }, new GestioneferieMsConfigurazionepfInterceptor(registry));
	}
}
