Package org.jtester.annotations.SpringBeanRemote

Examples of org.jtester.annotations.SpringBeanRemote.SpringBeanRemoteType


      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;
View Full Code Here


      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;
      }

      try {
        Object bean = ctx.getBean(beanID);
        FieldHelper.setFieldValue(testedObject, field, bean);
View Full Code Here

TOP

Related Classes of org.jtester.annotations.SpringBeanRemote.SpringBeanRemoteType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.