Example usage for org.springframework.beans.factory.support GenericBeanDefinition setSynthetic

List of usage examples for org.springframework.beans.factory.support GenericBeanDefinition setSynthetic

Introduction

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

Prototype

public void setSynthetic(boolean synthetic) 

Source Link

Document

Set whether this bean definition is 'synthetic', that is, not defined by the application itself (for example, an infrastructure bean such as a helper for auto-proxying, created through ).

Usage

From source file:org.wallride.autoconfigure.WebAdminComponentScanRegistrar.java

private void addWebAdminComponentScanBeanPostProcessor(BeanDefinitionRegistry registry,
        Set<String> packagesToScan) {
    GenericBeanDefinition beanDefinition = new GenericBeanDefinition();
    beanDefinition.setBeanClass(WebAdminComponentScanBeanPostProcessor.class);
    beanDefinition.getConstructorArgumentValues().addGenericArgumentValue(toArray(packagesToScan));
    beanDefinition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
    // We don't need this one to be post processed otherwise it can cause a
    // cascade of bean instantiation that we would rather avoid.
    beanDefinition.setSynthetic(true);
    registry.registerBeanDefinition(BEAN_NAME, beanDefinition);
}

From source file:org.wallride.autoconfigure.WebGuestComponentScanRegistrar.java

private void addWebGuestComponentScanBeanPostProcessor(BeanDefinitionRegistry registry,
        Set<String> packagesToScan) {
    GenericBeanDefinition beanDefinition = new GenericBeanDefinition();
    beanDefinition.setBeanClass(WebGuestComponentScanBeanPostProcessor.class);
    beanDefinition.getConstructorArgumentValues().addGenericArgumentValue(toArray(packagesToScan));
    beanDefinition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
    // We don't need this one to be post processed otherwise it can cause a
    // cascade of bean instantiation that we would rather avoid.
    beanDefinition.setSynthetic(true);
    registry.registerBeanDefinition(BEAN_NAME, beanDefinition);
}