return bean;
}
private void detectSpyComponent(Object bean) throws RuntimeException {
Class<?> beanClass = this.getBeanClass(bean);
SpyComponent spyComponentAnnotation = AnnotationUtils.findAnnotation(beanClass, SpyComponent.class);
if (spyComponentAnnotation != null) {
if (bean instanceof org.xmatthew.spy2servers.core.SpyComponent) {
org.xmatthew.spy2servers.core.SpyComponent spyComponent;
spyComponent = (org.xmatthew.spy2servers.core.SpyComponent) bean;
String name = spyComponentAnnotation.name();
if (StringUtils.isNotBlank(name)) {
spyComponent.setName(name);
}
} else {
throw new RuntimeException("@SpyComponent mark class must implement " +