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

com.chinare.axe.apm.APMConfiguration Maven / Gradle / Ivy

The newest version!
package com.chinare.axe.apm;

import org.nutz.log.Logs;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author kerbores
 *
 */
@Configuration
public class APMConfiguration {

	@Bean
	public APMInterceptor apmInterceptor(APMAppender appender, UserCollector collector, URLProvider urlProvider) {
		return new APMInterceptor(appender, collector, urlProvider);
	}

	@Bean
	@ConditionalOnMissingBean
	public APMAppender apmAppender() {
		return Logs.get()::debug;
	}

	@Bean
	@ConditionalOnMissingBean
	public URLProvider urlProvider() {
		return () -> null;
	}

	@Bean
	@ConditionalOnMissingBean
	public UserCollector userCollector() {
		return () -> null;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy