// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/config/metrics/actuator/Bucket4jEndpoint.java
// @Configuration
// @ConditionalOnClass(Endpoint.class)
// public class Bucket4jEndpoint {
// 
// 	@Configuration
// 	@Endpoint(id = "bucket4j")
// 	public static class Bucket4jEndpointConfig {
// 
// 		@Autowired(required = false)
// 		@Qualifier("SERVLET")
// 		private Bucket4jConfigurationHolder servletConfigs;
// 		
// 		@Autowired(required = false)
// 		@Qualifier("WEBFLUX")
// 		private Bucket4jConfigurationHolder webfluxConfigs;
// 		
// 		@Autowired(required = false)
// 		@Qualifier("GATEWAY")
// 		private Bucket4jConfigurationHolder gatewayConfigs;
// 		
// 		
// 		@ReadOperation
// 		public Map<String, Object> bucket4jConfig() {
// 			Map<String, Object> result = new HashMap<>();
// 			if(servletConfigs != null) {
// 				result.put("servlet", servletConfigs.getFilterConfiguration());
// 			}
// 			if(webfluxConfigs != null) {
// 				result.put("webflux", webfluxConfigs.getFilterConfiguration());
// 			}
// 			
// 			if(gatewayConfigs != null) {
// 				result.put("gateway", gatewayConfigs.getFilterConfiguration());
// 			}
// 			
// 			return result;
// 		}
// 		
// 	}
// 
// }
// 
// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/config/metrics/actuator/Bucket4jMetricsConfiguration.java
// @Configuration
// @ConditionalOnClass(value = {Metrics.class})
// @ConditionalOnProperty(prefix = Bucket4JBootProperties.PROPERTY_PREFIX + ".metrics", value = { "enabled" }, matchIfMissing = true)
// public class Bucket4jMetricsConfiguration {
// 
// 	@Bean
// 	@Primary
// 	public MetricHandler springBoot2Bucket4jMetricHandler() {
// 		return new Bucket4jMetricHandler();
// 	}
// 	
// }


import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import com.giffing.bucket4j.spring.boot.starter.config.metrics.actuator.Bucket4jEndpoint;
import com.giffing.bucket4j.spring.boot.starter.config.metrics.actuator.Bucket4jMetricsConfiguration;

package com.giffing.bucket4j.spring.boot.starter.config.springboot;




@Configuration
@ConditionalOnClass(value = { Bucket4jEndpoint.class})

// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/config/metrics/actuator/Bucket4jEndpoint.java
// @Configuration
// @ConditionalOnClass(Endpoint.class)
// public class Bucket4jEndpoint {
// 
// 	@Configuration
// 	@Endpoint(id = "bucket4j")
// 	public static class Bucket4jEndpointConfig {
// 
// 		@Autowired(required = false)
// 		@Qualifier("SERVLET")
// 		private Bucket4jConfigurationHolder servletConfigs;
// 		
// 		@Autowired(required = false)
// 		@Qualifier("WEBFLUX")
// 		private Bucket4jConfigurationHolder webfluxConfigs;
// 		
// 		@Autowired(required = false)
// 		@Qualifier("GATEWAY")
// 		private Bucket4jConfigurationHolder gatewayConfigs;
// 		
// 		
// 		@ReadOperation
// 		public Map<String, Object> bucket4jConfig() {
// 			Map<String, Object> result = new HashMap<>();
// 			if(servletConfigs != null) {
// 				result.put("servlet", servletConfigs.getFilterConfiguration());
// 			}
// 			if(webfluxConfigs != null) {
// 				result.put("webflux", webfluxConfigs.getFilterConfiguration());
// 			}
// 			
// 			if(gatewayConfigs != null) {
// 				result.put("gateway", gatewayConfigs.getFilterConfiguration());
// 			}
// 			
// 			return result;
// 		}
// 		
// 	}
// 
// }
// 
// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/config/metrics/actuator/Bucket4jMetricsConfiguration.java
// @Configuration
// @ConditionalOnClass(value = {Metrics.class})
// @ConditionalOnProperty(prefix = Bucket4JBootProperties.PROPERTY_PREFIX + ".metrics", value = { "enabled" }, matchIfMissing = true)
// public class Bucket4jMetricsConfiguration {
// 
// 	@Bean
// 	@Primary
// 	public MetricHandler springBoot2Bucket4jMetricHandler() {
// 		return new Bucket4jMetricHandler();
// 	}
// 	
// }


// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/config/springboot/SpringBootActuatorConfig.java
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import com.giffing.bucket4j.spring.boot.starter.config.metrics.actuator.Bucket4jEndpoint;
import com.giffing.bucket4j.spring.boot.starter.config.metrics.actuator.Bucket4jMetricsConfiguration;

package com.giffing.bucket4j.spring.boot.starter.config.springboot;




@Configuration
@ConditionalOnClass(value = { Bucket4jEndpoint.class})

@Import( value = {Bucket4jEndpoint.class, Bucket4jMetricsConfiguration.class})
