use of io.moyada.spring.boot.sharingan.context.ScanPackages in project dubbo-faker by moyada.
the class SharinganMonitorAutoConfiguration method setBeanFactory.
@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
ScanPackages bean;
try {
bean = beanFactory.getBean(ScanPackages.class);
} catch (BeansException e) {
return;
}
this.basePackages = bean.getBasePackages();
if (beanFactory instanceof DefaultListableBeanFactory) {
((DefaultListableBeanFactory) beanFactory).removeBeanDefinition(ScanPackages.BEAN_NAME);
((DefaultListableBeanFactory) beanFactory).destroyBean(bean);
}
}
Aggregations