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

analyze() — spring-boot Function Reference

Architecture documentation for the analyze() function in NotConstructorBoundInjectionFailureAnalyzer.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  2b6f4821_149d_a73b_a780_287999f29f5d["analyze()"]
  bf6a10a3_acf4_7c70_137d_19f5c8444a1a["analyze()"]
  2b6f4821_149d_a73b_a780_287999f29f5d -->|calls| bf6a10a3_acf4_7c70_137d_19f5c8444a1a
  1789f234_a308_a1d6_45fd_68b0ea71bfaf["findInjectionPoint()"]
  2b6f4821_149d_a73b_a780_287999f29f5d -->|calls| 1789f234_a308_a1d6_45fd_68b0ea71bfaf
  56286f67_f4cd_9781_2b4f_27f096286cfc["isConstructorBindingConfigurationProperties()"]
  2b6f4821_149d_a73b_a780_287999f29f5d -->|calls| 56286f67_f4cd_9781_2b4f_27f096286cfc
  1c0a452a_a003_0ab7_8926_72358d1266ed["FailureAnalysis()"]
  2b6f4821_149d_a73b_a780_287999f29f5d -->|calls| 1c0a452a_a003_0ab7_8926_72358d1266ed
  style 2b6f4821_149d_a73b_a780_287999f29f5d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/context/properties/NotConstructorBoundInjectionFailureAnalyzer.java lines 50–65

	@Override
	protected @Nullable FailureAnalysis analyze(Throwable rootFailure, NoSuchBeanDefinitionException cause,
			@Nullable String description) {
		InjectionPoint injectionPoint = findInjectionPoint(rootFailure);
		if (isConstructorBindingConfigurationProperties(injectionPoint)) {
			String simpleName = injectionPoint.getMember().getDeclaringClass().getSimpleName();
			String action = "Update your configuration so that " + simpleName + " is defined via @"
					+ ConfigurationPropertiesScan.class.getSimpleName() + " or @"
					+ EnableConfigurationProperties.class.getSimpleName() + ".";
			return new FailureAnalysis(
					simpleName + " is annotated with @" + ConstructorBinding.class.getSimpleName()
							+ " but it is defined as a regular bean which caused dependency injection to fail.",
					action, cause);
		}
		return null;
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does analyze() do?
analyze() is a function in the spring-boot codebase.
What does analyze() call?
analyze() calls 4 function(s): FailureAnalysis, analyze, findInjectionPoint, isConstructorBindingConfigurationProperties.

Analyze Your Own Codebase

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

Try Supermodel Free