Home / Function/ getSearchBeanFactory() — spring-boot Function Reference

getSearchBeanFactory() — spring-boot Function Reference

Architecture documentation for the getSearchBeanFactory() function in OnBeanCondition.java from the spring-boot codebase.

Function java GradlePlugin AotProcessing calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  8f1f8954_51c8_a466_9ffb_38ba46644698["getSearchBeanFactory()"]
  e8d44fa6_45ad_6d14_6468_53ed18c907e0["getMatchingBeans()"]
  e8d44fa6_45ad_6d14_6468_53ed18c907e0 -->|calls| 8f1f8954_51c8_a466_9ffb_38ba46644698
  3f8c59d2_e032_b018_de26_f8360730651b["getContext()"]
  8f1f8954_51c8_a466_9ffb_38ba46644698 -->|calls| 3f8c59d2_e032_b018_de26_f8360730651b
  1ac703ed_372f_03eb_304a_f76d7a096ee5["getStrategy()"]
  8f1f8954_51c8_a466_9ffb_38ba46644698 -->|calls| 1ac703ed_372f_03eb_304a_f76d7a096ee5
  style 8f1f8954_51c8_a466_9ffb_38ba46644698 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnBeanCondition.java lines 257–267

	private ConfigurableListableBeanFactory getSearchBeanFactory(Spec<?> spec) {
		ConfigurableListableBeanFactory beanFactory = spec.getContext().getBeanFactory();
		Assert.state(beanFactory != null, "'beanFactory' must not be null'");
		if (spec.getStrategy() == SearchStrategy.ANCESTORS) {
			BeanFactory parent = beanFactory.getParentBeanFactory();
			Assert.state(parent instanceof ConfigurableListableBeanFactory,
					"Unable to use SearchStrategy.ANCESTORS without ConfigurableListableBeanFactory");
			beanFactory = (ConfigurableListableBeanFactory) parent;
		}
		return beanFactory;
	}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does getSearchBeanFactory() do?
getSearchBeanFactory() is a function in the spring-boot codebase.
What does getSearchBeanFactory() call?
getSearchBeanFactory() calls 2 function(s): getContext, getStrategy.
What calls getSearchBeanFactory()?
getSearchBeanFactory() is called by 1 function(s): getMatchingBeans.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free