use of io.moyada.spring.boot.sharingan.context.ListenerInfo in project dubbo-faker by moyada.
the class MonitorBeanDefinitionScanner method processBeanDefinitions.
private void processBeanDefinitions(Set<BeanDefinitionHolder> beanDefinitions) {
initAppInfo();
for (BeanDefinitionHolder holder : beanDefinitions) {
AbstractBeanDefinition definition = (AbstractBeanDefinition) holder.getBeanDefinition();
Class<?> beanClass = BeanDefinitionUtil.getClass(definition);
if (null == beanClass) {
continue;
}
ListenerInfo listenerInfo = ListenerAnalyser.getListenerInfo(beanClass);
if (null == listenerInfo) {
continue;
}
initData(listenerInfo);
// 修改 BeanDefinition 类信息
Class<?> newBeanClass = proxy(beanClass, listenerInfo.getListenerMethods());
if (this.logger.isDebugEnabled()) {
this.logger.debug("Creating MonitorProxy Wrapper Bean name '" + holder.getBeanName() + "', type is '" + definition.getBeanClassName() + "'");
}
definition.setBeanClass(newBeanClass);
}
}
Aggregations