// Path: spring-influxdb-orm/src/main/java/com/vgerbot/orm/influxdb/mapper/MapperScannerConfigurer.java
// public class MapperScannerConfigurer implements BeanDefinitionRegistryPostProcessor, InitializingBean {
// 
// 	public static final String BASE_DAO_PACKAGE_FIELD = "baseDaoPackage";
// 	public static final String REPOSITORY_NAME_FIELD = "repositoryName";
// 
// 	private String baseDaoPackage;
// 
// 	private String includeDaoClassNameRegex;
// 
// 	private String excludeDaoClassNameRegex;
// 
// 	private String repositoryName;
// 
// 	@Override
// 	public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
// 
// 	}
// 
// 	@Override
// 	public void afterPropertiesSet() throws Exception {
// 		Assert.notNull(baseDaoPackage, "Property 'baseDaoPackage' is required");
// 		Assert.notNull(repositoryName, "Property 'repositoryName' is required");
// 
// 	}
// 
// 	@Override
// 	public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
// 		ClassPathMapperScanner scanner = new ClassPathMapperScanner(registry);
// 		scanner.setIncludeDaoClassNameRegex(includeDaoClassNameRegex);
// 		scanner.setExcludeDaoClassNameRegex(excludeDaoClassNameRegex);
// 		scanner.registerFilters();
// 		scanner.setRepositoryName(repositoryName);
// 		scanner.scan(StringUtils.tokenizeToStringArray(baseDaoPackage, ConfigurableApplicationContext.CONFIG_LOCATION_DELIMITERS));
// 	}
// 
// 	public void setBaseDaoPackage(String baseDaoPackage) {
// 		this.baseDaoPackage = baseDaoPackage;
// 	}
// 
// 	public void setRepositoryName(String repositoryName) {
// 		this.repositoryName = repositoryName;
// 	}
// 
// 	public void setIncludeDaoClassNameRegex(String includeDaoClassNameRegex) {
// 		this.includeDaoClassNameRegex = includeDaoClassNameRegex;
// 	}
// 
// 	public void setExcludeDaoClassNameRegex(String excludeDaoClassNameRegex) {
// 		this.excludeDaoClassNameRegex = excludeDaoClassNameRegex;
// 	}
// }


import com.vgerbot.orm.influxdb.annotations.InfluxDBORM;
import com.vgerbot.orm.influxdb.mapper.MapperScannerConfigurer;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.BeanDefinitionReaderUtils;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.boot.autoconfigure.AutoConfigurationPackages;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.util.Assert;
import java.util.List;
package com.vgerbot.orm.influxdb.configure;



@AutoConfigureAfter({ RepositoryAutoConfigure.class})
public class MapperScannerAutoConfigure implements ImportBeanDefinitionRegistrar, BeanFactoryAware {
    private BeanFactory beanFactory;
    @Override
    public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
        AnnotationAttributes attributes = AnnotationAttributes.fromMap(
                importingClassMetadata.getAnnotationAttributes(InfluxDBORM.class.getName(), false)
        );
        String[] daoBasePackages = null;
        if (attributes != null) {
            daoBasePackages = attributes.getStringArray(InfluxDBORM.FIELD_NAME_DAO_BASE_PACKAGE);
        }
        if (ArrayUtils.isEmpty(daoBasePackages)) {
            if(AutoConfigurationPackages.has(beanFactory)) {
// Path: spring-influxdb-orm/src/main/java/com/vgerbot/orm/influxdb/mapper/MapperScannerConfigurer.java
// public class MapperScannerConfigurer implements BeanDefinitionRegistryPostProcessor, InitializingBean {
// 
// 	public static final String BASE_DAO_PACKAGE_FIELD = "baseDaoPackage";
// 	public static final String REPOSITORY_NAME_FIELD = "repositoryName";
// 
// 	private String baseDaoPackage;
// 
// 	private String includeDaoClassNameRegex;
// 
// 	private String excludeDaoClassNameRegex;
// 
// 	private String repositoryName;
// 
// 	@Override
// 	public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
// 
// 	}
// 
// 	@Override
// 	public void afterPropertiesSet() throws Exception {
// 		Assert.notNull(baseDaoPackage, "Property 'baseDaoPackage' is required");
// 		Assert.notNull(repositoryName, "Property 'repositoryName' is required");
// 
// 	}
// 
// 	@Override
// 	public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
// 		ClassPathMapperScanner scanner = new ClassPathMapperScanner(registry);
// 		scanner.setIncludeDaoClassNameRegex(includeDaoClassNameRegex);
// 		scanner.setExcludeDaoClassNameRegex(excludeDaoClassNameRegex);
// 		scanner.registerFilters();
// 		scanner.setRepositoryName(repositoryName);
// 		scanner.scan(StringUtils.tokenizeToStringArray(baseDaoPackage, ConfigurableApplicationContext.CONFIG_LOCATION_DELIMITERS));
// 	}
// 
// 	public void setBaseDaoPackage(String baseDaoPackage) {
// 		this.baseDaoPackage = baseDaoPackage;
// 	}
// 
// 	public void setRepositoryName(String repositoryName) {
// 		this.repositoryName = repositoryName;
// 	}
// 
// 	public void setIncludeDaoClassNameRegex(String includeDaoClassNameRegex) {
// 		this.includeDaoClassNameRegex = includeDaoClassNameRegex;
// 	}
// 
// 	public void setExcludeDaoClassNameRegex(String excludeDaoClassNameRegex) {
// 		this.excludeDaoClassNameRegex = excludeDaoClassNameRegex;
// 	}
// }


// Path: spring-influxdb-orm-autoconfigure/src/main/java/com/vgerbot/orm/influxdb/configure/MapperScannerAutoConfigure.java
import com.vgerbot.orm.influxdb.annotations.InfluxDBORM;
import com.vgerbot.orm.influxdb.mapper.MapperScannerConfigurer;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.BeanDefinitionReaderUtils;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.boot.autoconfigure.AutoConfigurationPackages;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.util.Assert;
import java.util.List;

package com.vgerbot.orm.influxdb.configure;



@AutoConfigureAfter({ RepositoryAutoConfigure.class})
public class MapperScannerAutoConfigure implements ImportBeanDefinitionRegistrar, BeanFactoryAware {
    private BeanFactory beanFactory;
    @Override
    public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
        AnnotationAttributes attributes = AnnotationAttributes.fromMap(
                importingClassMetadata.getAnnotationAttributes(InfluxDBORM.class.getName(), false)
        );
        String[] daoBasePackages = null;
        if (attributes != null) {
            daoBasePackages = attributes.getStringArray(InfluxDBORM.FIELD_NAME_DAO_BASE_PACKAGE);
        }
        if (ArrayUtils.isEmpty(daoBasePackages)) {
            if(AutoConfigurationPackages.has(beanFactory)) {
                List<String> packages = AutoConfigurationPackages.get(beanFactory);