*/
public static void registerSpringBeanRemoteOnClient(final DefaultListableBeanFactory beanFactory,
final Class testedClazz) {
Set<Field> fields_HttpInvoker = AnnotationUtils.getFieldsAnnotatedWith(testedClazz, SpringBeanRemote.class);
for (Field field : fields_HttpInvoker) {
SpringBeanRemote springBeanRemote = field.getAnnotation(SpringBeanRemote.class);
String beanID = springBeanRemote.value();
if (StringHelper.isBlankOrNull(beanID)) {
beanID = field.getName();
}
SpringBeanRemoteType type = SpringBeanRemoteType.getTypeFromURL(beanID);
if (type == null) {
type = springBeanRemote.type();
beanID = type.name() + "/" + beanID;
}
if (beanFactory.containsBeanDefinition(beanID)) {
JTesterLogger.info(String.format("spring bean[%s] has been defined in application context!", beanID));
return;
}
String serviceUrl = springBeanRemote.serviceUrl();
if (StringHelper.isBlankOrNull(serviceUrl)) {
serviceUrl = SPRINGBEAN_REMOTE_BASEURL + "/" + beanID;
}
Class serviceInterface = springBeanRemote.serviceInterface();
if (serviceInterface == null || serviceInterface == Object.class) {
serviceInterface = field.getType();
}
RootBeanDefinition beanDefinition = newClientRemoteInvokerBeanDefinition(beanID, serviceUrl,