Package org.springframework.beans.factory.support

Examples of org.springframework.beans.factory.support.BeanDefinitionBuilder.addPropertyValue()


  }

  private BeanDefinition createLazyInitTargetSourceBeanDefinition(String auditorAwareRef) {

    BeanDefinitionBuilder targetSourceBuilder = rootBeanDefinition(LazyInitTargetSource.class);
    targetSourceBuilder.addPropertyValue("targetBeanName", auditorAwareRef);

    BeanDefinitionBuilder builder = rootBeanDefinition(ProxyFactoryBean.class);
    builder.addPropertyValue("targetSource", targetSourceBuilder.getBeanDefinition());

    return builder.getBeanDefinition();
View Full Code Here


    BeanDefinitionBuilder targetSourceBuilder = rootBeanDefinition(LazyInitTargetSource.class);
    targetSourceBuilder.addPropertyValue("targetBeanName", auditorAwareRef);

    BeanDefinitionBuilder builder = rootBeanDefinition(ProxyFactoryBean.class);
    builder.addPropertyValue("targetSource", targetSourceBuilder.getBeanDefinition());

    return builder.getBeanDefinition();
  }
}
View Full Code Here

  }

  private BeanDefinition createLazyInitTargetSourceBeanDefinition(String auditorAwareRef) {

    BeanDefinitionBuilder targetSourceBuilder = rootBeanDefinition(LazyInitTargetSource.class);
    targetSourceBuilder.addPropertyValue("targetBeanName", auditorAwareRef);

    BeanDefinitionBuilder builder = rootBeanDefinition(ProxyFactoryBean.class);
    builder.addPropertyValue("targetSource", targetSourceBuilder.getBeanDefinition());

    return builder.getBeanDefinition();
View Full Code Here

    BeanDefinitionBuilder targetSourceBuilder = rootBeanDefinition(LazyInitTargetSource.class);
    targetSourceBuilder.addPropertyValue("targetBeanName", auditorAwareRef);

    BeanDefinitionBuilder builder = rootBeanDefinition(ProxyFactoryBean.class);
    builder.addPropertyValue("targetSource", targetSourceBuilder.getBeanDefinition());

    return builder.getBeanDefinition();
  }
}
View Full Code Here

  }

  private BeanDefinition createLazyInitTargetSourceBeanDefinition(String auditorAwareRef) {

    BeanDefinitionBuilder targetSourceBuilder = rootBeanDefinition(LazyInitTargetSource.class);
    targetSourceBuilder.addPropertyValue("targetBeanName", auditorAwareRef);

    BeanDefinitionBuilder builder = rootBeanDefinition(ProxyFactoryBean.class);
    builder.addPropertyValue("targetSource", targetSourceBuilder.getBeanDefinition());

    return builder.getBeanDefinition();
View Full Code Here

    BeanDefinitionBuilder targetSourceBuilder = rootBeanDefinition(LazyInitTargetSource.class);
    targetSourceBuilder.addPropertyValue("targetBeanName", auditorAwareRef);

    BeanDefinitionBuilder builder = rootBeanDefinition(ProxyFactoryBean.class);
    builder.addPropertyValue("targetSource", targetSourceBuilder.getBeanDefinition());

    return builder.getBeanDefinition();
  }
}
View Full Code Here

  public BeanDefinition build(Object source) {

    BeanDefinitionBuilder properties = BeanDefinitionBuilder.rootBeanDefinition(PropertiesFactoryBean.class);

    String locationsToUse = StringUtils.hasText(locations) ? locations : defaultLocation;
    properties.addPropertyValue("locations", locationsToUse);

    if (!StringUtils.hasText(locations)) {
      properties.addPropertyValue("ignoreResourceNotFound", true);
    }
View Full Code Here

    String locationsToUse = StringUtils.hasText(locations) ? locations : defaultLocation;
    properties.addPropertyValue("locations", locationsToUse);

    if (!StringUtils.hasText(locations)) {
      properties.addPropertyValue("ignoreResourceNotFound", true);
    }

    AbstractBeanDefinition propertiesDefinition = properties.getBeanDefinition();
    propertiesDefinition.setSource(source);
View Full Code Here

  }

  private BeanDefinition getBeanDefinitionFor(Class<?> repositoryInterface) {

    BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(RepositoryFactoryBeanSupport.class);
    builder.addPropertyValue("repositoryInterface", repositoryInterface.getName());
    return builder.getBeanDefinition();
  }

  interface PlainInterface {
View Full Code Here

  @Before
  public void setup() {

    BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(DummyRepositoryFactoryBean.class);
    builder.addPropertyValue("repositoryInterface", EntityRepository.class);

    DefaultListableBeanFactory factory = new DefaultListableBeanFactory();
    factory.registerBeanDefinition("provider", builder.getBeanDefinition());

    context = new GenericApplicationContext(factory);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.