Example usage for org.springframework.beans.factory.support BeanDefinitionDefaults setLazyInit

List of usage examples for org.springframework.beans.factory.support BeanDefinitionDefaults setLazyInit

Introduction

In this page you can find the example usage for org.springframework.beans.factory.support BeanDefinitionDefaults setLazyInit.

Prototype

public void setLazyInit(boolean lazyInit) 

Source Link

Document

Set whether beans should be lazily initialized by default.

Usage

From source file:org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.java

/**
 * Return the default settings for bean definitions as indicated within
 * the attributes of the top-level {@code <beans/>} element.
 *///w w  w. ja  va  2s  . c  om
public BeanDefinitionDefaults getBeanDefinitionDefaults() {
    BeanDefinitionDefaults bdd = new BeanDefinitionDefaults();
    bdd.setLazyInit("TRUE".equalsIgnoreCase(this.defaults.getLazyInit()));
    bdd.setAutowireMode(getAutowireMode(DEFAULT_VALUE));
    bdd.setInitMethodName(this.defaults.getInitMethod());
    bdd.setDestroyMethodName(this.defaults.getDestroyMethod());
    return bdd;
}