com.alanpoi.etactivity.agent.ActivityBeanRegistry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of et-activity-client Show documentation
Show all versions of et-activity-client Show documentation
Alan POI Et-activity Client
package com.alanpoi.etactivity.agent;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
import org.springframework.context.ResourceLoaderAware;
import org.springframework.core.io.ResourceLoader;
import org.springframework.stereotype.Component;
/**
* Bean registry
*
* @author pengzhuoxun
* @since 1.3.0
*/
@Component
public class ActivityBeanRegistry implements BeanDefinitionRegistryPostProcessor, ResourceLoaderAware, BeanFactoryAware {
private ResourceLoader resourceLoader;
@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
ActivityClassPathBeanDefinitionScanner scanner = new ActivityClassPathBeanDefinitionScanner(registry, false);
scanner.setResourceLoader(resourceLoader);
scanner.registerDefaultFilters();
scanner.doScan("com.alanpoi.etactivity");
}
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
}
@Override
public void setResourceLoader(ResourceLoader resourceLoader) {
this.resourceLoader = resourceLoader;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy