Examples of configureBean()


Examples of org.springframework.beans.factory.config.AutowireCapableBeanFactory.configureBean()

        if (beanFactory.containsBean(viewName)) {
            final Class<?> viewBeanType = beanFactory.getType(viewName);
            // viewBeanType could be null if bean is abstract (just a set of properties)
            if (viewBeanType != null && AbstractThymeleafView.class.isAssignableFrom(viewBeanType)) {
                view = (AbstractThymeleafView) beanFactory.configureBean(view, viewName);
            } else {
                // The AUTOWIRE_NO mode applies autowiring only through annotations
                beanFactory.autowireBeanProperties(view, AutowireCapableBeanFactory.AUTOWIRE_NO, false);
                // A bean with this name exists, so we apply its properties
                beanFactory.applyBeanPropertyValues(view, viewName);
View Full Code Here

Examples of org.springframework.beans.factory.config.AutowireCapableBeanFactory.configureBean()

        if (beanFactory.containsBean(viewName)) {
            final Class<?> viewBeanType = beanFactory.getType(viewName);
            // viewBeanType could be null if bean is abstract (just a set of properties)
            if (viewBeanType != null && AbstractThymeleafView.class.isAssignableFrom(viewBeanType)) {
                view = (AbstractThymeleafView) beanFactory.configureBean(view, viewName);
            } else {
                // The AUTOWIRE_NO mode applies autowiring only through annotations
                beanFactory.autowireBeanProperties(view, AutowireCapableBeanFactory.AUTOWIRE_NO, false);
                // A bean with this name exists, so we apply its properties
                beanFactory.applyBeanPropertyValues(view, viewName);
View Full Code Here

Examples of org.springframework.beans.factory.config.AutowireCapableBeanFactory.configureBean()

      Map<String, ComponentMethodInterceptable> interceptableComponents = getApplicationContext().getBeansOfType(
        ComponentMethodInterceptable.class);
      for(Map.Entry<String, ComponentMethodInterceptable> entry : interceptableComponents.entrySet()) {
        Object bean = getTargetObject(entry.getValue());
        beanFactory.configureBean(bean, entry.getKey());
      }
     
      Map<String, ComponentLifecycle> lifecycleComponents = getApplicationContext().getBeansOfType(ComponentLifecycle.class);
      Map[] classifiedComponents = new Map[ComponentLifecycle.MAX_RUN_LEVELS];
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.configureBean()

    MutablePropertyValues pvs = new MutablePropertyValues();
    pvs.addPropertyValue("age", "99");
    lbf.registerBeanDefinition("test", new RootBeanDefinition(TestBean.class, pvs));
    TestBean tb = new TestBean();
    assertEquals(0, tb.getAge());
    lbf.configureBean(tb, "test");
    assertEquals(99, tb.getAge());
    assertSame(lbf, tb.getBeanFactory());
    assertNull(tb.getSpouse());
  }
View Full Code Here

Examples of org.springframework.beans.factory.wiring.BeanConfigurerSupport.configureBean()

        }
      });
    }

    configurer.afterPropertiesSet();
    configurer.configureBean(this);
    configurer.destroy();
  }
}
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.