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

addComponentScanningPackages() — spring-boot Function Reference

Architecture documentation for the addComponentScanningPackages() function in ConfigurationWarningsApplicationContextInitializer.java from the spring-boot codebase.

Function java GradlePlugin RunTasks calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  2976e2b2_80e3_bc24_04c1_e199bac8911b["addComponentScanningPackages()"]
  2001b5a3_f1dc_df2c_bad2_46aedfdd7fa4["getComponentScanningPackages()"]
  2001b5a3_f1dc_df2c_bad2_46aedfdd7fa4 -->|calls| 2976e2b2_80e3_bc24_04c1_e199bac8911b
  089903c9_679e_bd45_546d_1391a1b8bdc0["addPackages()"]
  2976e2b2_80e3_bc24_04c1_e199bac8911b -->|calls| 089903c9_679e_bd45_546d_1391a1b8bdc0
  080bd6f4_5f24_af52_ee92_4cb7cf3df3d3["addClasses()"]
  2976e2b2_80e3_bc24_04c1_e199bac8911b -->|calls| 080bd6f4_5f24_af52_ee92_4cb7cf3df3d3
  style 2976e2b2_80e3_bc24_04c1_e199bac8911b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/context/ConfigurationWarningsApplicationContextInitializer.java lines 163–174

		private void addComponentScanningPackages(Set<String> packages, AnnotationMetadata metadata) {
			AnnotationAttributes attributes = AnnotationAttributes
				.fromMap(metadata.getAnnotationAttributes(ComponentScan.class.getName(), true));
			if (attributes != null) {
				addPackages(packages, attributes.getStringArray("value"));
				addPackages(packages, attributes.getStringArray("basePackages"));
				addClasses(packages, attributes.getStringArray("basePackageClasses"));
				if (packages.isEmpty()) {
					packages.add(ClassUtils.getPackageName(metadata.getClassName()));
				}
			}
		}

Domain

Subdomains

Calls

  • addClasses()
  • addPackages()

Called By

  • getComponentScanningPackages()

Frequently Asked Questions

What does addComponentScanningPackages() do?
addComponentScanningPackages() is a function in the spring-boot codebase.
What does addComponentScanningPackages() call?
addComponentScanningPackages() calls 2 function(s): addClasses, addPackages.
What calls addComponentScanningPackages()?
addComponentScanningPackages() is called by 1 function(s): getComponentScanningPackages.

Analyze Your Own Codebase

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

Try Supermodel Free