Examples of autowireBeanProperties()


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

                } else {
                    throw new ValangException("Could not autowire function: application context or bean factory does not support autowiring", line, column);
                }
            }
            if (abstractFunction.isAutowireByName()) {
                autowireCapableBeanFactory.autowireBeanProperties(function, AutowireCapableBeanFactory.AUTOWIRE_BY_NAME, false);
            }
            if (abstractFunction.isAutowireByType()) {
                autowireCapableBeanFactory.autowireBeanProperties(function, AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE, false);
            }
            try {
View Full Code Here

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

            }
            if (abstractFunction.isAutowireByName()) {
                autowireCapableBeanFactory.autowireBeanProperties(function, AutowireCapableBeanFactory.AUTOWIRE_BY_NAME, false);
            }
            if (abstractFunction.isAutowireByType()) {
                autowireCapableBeanFactory.autowireBeanProperties(function, AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE, false);
            }
            try {
                abstractFunction.init();
            } catch (Exception e) {
                throw new ValangException("Error initializing function", e, line, column);
View Full Code Here

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

    private void injectDependencies(ApplicationContext applicationContext, Object testCase) {

        // retrieves the bean factory
        AutowireCapableBeanFactory beanFactory = applicationContext.getAutowireCapableBeanFactory();
        // injects all the members
        beanFactory.autowireBeanProperties(testCase, AutowireCapableBeanFactory.AUTOWIRE_NO, false);
        // initialize the bean
        beanFactory.initializeBean(testCase, testCase.getClass().getName());
    }

    /**
 
View Full Code Here

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

            // 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);
                // Finally, we let Spring do the remaining initializations (incl. proxifying if needed)
                view = (AbstractThymeleafView) beanFactory.initializeBean(view, viewName);
            }
View Full Code Here

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

                // Finally, we let Spring do the remaining initializations (incl. proxifying if needed)
                view = (AbstractThymeleafView) beanFactory.initializeBean(view, viewName);
            }
        } else {
            // The AUTOWIRE_NO mode applies autowiring only through annotations
            beanFactory.autowireBeanProperties(view, AutowireCapableBeanFactory.AUTOWIRE_NO, false);
            // Finally, we let Spring do the remaining initializations (incl. proxifying if needed)
            view = (AbstractThymeleafView) beanFactory.initializeBean(view, viewName);
        }

        view.setTemplateEngine(getTemplateEngine());
View Full Code Here

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

            // 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);
                // Finally, we let Spring do the remaining initializations (incl. proxifying if needed)
                view = (AbstractThymeleafView) beanFactory.initializeBean(view, viewName);
            }
View Full Code Here

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

                // Finally, we let Spring do the remaining initializations (incl. proxifying if needed)
                view = (AbstractThymeleafView) beanFactory.initializeBean(view, viewName);
            }
        } else {
            // The AUTOWIRE_NO mode applies autowiring only through annotations
            beanFactory.autowireBeanProperties(view, AutowireCapableBeanFactory.AUTOWIRE_NO, false);
            // Finally, we let Spring do the remaining initializations (incl. proxifying if needed)
            view = (AbstractThymeleafView) beanFactory.initializeBean(view, viewName);
        }

        view.setTemplateEngine(getTemplateEngine());
View Full Code Here

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

   * @see #beforeTestMethod(TestContext)
   */
  protected void injectDependencies(final TestContext testContext) throws Exception {
    Object bean = testContext.getTestInstance();
    AutowireCapableBeanFactory beanFactory = testContext.getApplicationContext().getAutowireCapableBeanFactory();
    beanFactory.autowireBeanProperties(bean, AutowireCapableBeanFactory.AUTOWIRE_NO, false);
    beanFactory.initializeBean(bean, testContext.getTestClass().getName());
    testContext.removeAttribute(REINJECT_DEPENDENCIES_ATTRIBUTE);
  }

}
View Full Code Here

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

    @Override
    protected void injectDependencies(TestContext testContext) throws Exception {
        MergeClassPathXMLApplicationContext context = BaseTest.getContext();
        Object bean = testContext.getTestInstance();
        AutowireCapableBeanFactory beanFactory = context.getAutowireCapableBeanFactory();
        beanFactory.autowireBeanProperties(bean, AutowireCapableBeanFactory.AUTOWIRE_AUTODETECT, true);
        beanFactory.initializeBean(bean, testContext.getTestClass().getName());
        testContext.removeAttribute(REINJECT_DEPENDENCIES_ATTRIBUTE);
    }

}
View Full Code Here

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

   * @see #beforeTestMethod(TestContext)
   */
  protected void injectDependencies(final TestContext testContext) throws Exception {
    Object bean = testContext.getTestInstance();
    AutowireCapableBeanFactory beanFactory = testContext.getApplicationContext().getAutowireCapableBeanFactory();
    beanFactory.autowireBeanProperties(bean, AutowireCapableBeanFactory.AUTOWIRE_NO, false);
    beanFactory.initializeBean(bean, testContext.getTestClass().getName());
    testContext.removeAttribute(REINJECT_DEPENDENCIES_ATTRIBUTE);
  }

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