ClassPathBeanDefinitionScanner(registry: BeanDefinitionRegistry)
Create a new ClassPathBeanDefinitionScanner for the given bean factory.
registry - the BeanFactory to load bean definitions into, in the form of a BeanDefinitionRegistry
ClassPathBeanDefinitionScanner(registry: BeanDefinitionRegistry, useDefaultFilters: Boolean)
Create a new ClassPathBeanDefinitionScanner for the given bean factory.
If the passed-in bean factory does not only implement the BeanDefinitionRegistry interface but also the ResourceLoader interface, it will be used as default ResourceLoader as well. This will usually be the case for org.springframework.context.ApplicationContext implementations.
If given a plain BeanDefinitionRegistry, the default ResourceLoader will be a org.springframework.core.io.support.PathMatchingResourcePatternResolver.
If the passed-in bean factory also implements EnvironmentCapable its environment will be used by this reader. Otherwise, the reader will initialize and use a org.springframework.core.env.StandardEnvironment. All ApplicationContext implementations are EnvironmentCapable, while normal BeanFactory implementations are not.
registry - the BeanFactory to load bean definitions into, in the form of a BeanDefinitionRegistry
useDefaultFilters - whether to include the default filters for the org.springframework.stereotype.Component, org.springframework.stereotype.Repository, org.springframework.stereotype.Service, and org.springframework.stereotype.Controller stereotype annotations
See Also
#setResourceLoader#setEnvironment
ClassPathBeanDefinitionScanner(registry: BeanDefinitionRegistry, useDefaultFilters: Boolean, environment: Environment)
Create a new ClassPathBeanDefinitionScanner for the given bean factory and using the given Environment when evaluating bean definition profile metadata.
If the passed-in bean factory does not only implement the BeanDefinitionRegistry interface but also the ResourceLoader interface, it will be used as default ResourceLoader as well. This will usually be the case for org.springframework.context.ApplicationContext implementations.
If given a plain BeanDefinitionRegistry, the default ResourceLoader will be a org.springframework.core.io.support.PathMatchingResourcePatternResolver.
registry - the BeanFactory to load bean definitions into, in the form of a BeanDefinitionRegistry
useDefaultFilters - whether to include the default filters for the org.springframework.stereotype.Component, org.springframework.stereotype.Repository, org.springframework.stereotype.Service, and org.springframework.stereotype.Controller stereotype annotations
environment - the Spring Environment to use when evaluating bean definition profile metadata
Since
3.1
See Also
#setResourceLoader
ClassPathBeanDefinitionScanner(registry: BeanDefinitionRegistry, useDefaultFilters: Boolean, environment: Environment, @Nullable resourceLoader: ResourceLoader)
Create a new ClassPathBeanDefinitionScanner for the given bean factory and using the given Environment when evaluating bean definition profile metadata.
registry - the BeanFactory to load bean definitions into, in the form of a BeanDefinitionRegistry
useDefaultFilters - whether to include the default filters for the org.springframework.stereotype.Component, org.springframework.stereotype.Repository, org.springframework.stereotype.Service, and org.springframework.stereotype.Controller stereotype annotations
environment - the Spring Environment to use when evaluating bean definition profile metadata
resourceLoader - the ResourceLoader to use
Since
4.3.6