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

buildMessage() — spring-boot Function Reference

Architecture documentation for the buildMessage() function in BeanCurrentlyInCreationFailureAnalyzer.java from the spring-boot codebase.

Function java GradlePlugin DslExtensions calls 4 called by 1

Entity Profile

Dependency Diagram

graph TD
  1a3a73b3_53a4_6327_8d25_8e235ffff058["buildMessage()"]
  b173f43d_cf20_26af_3310_afb9c31255be["analyze()"]
  b173f43d_cf20_26af_3310_afb9c31255be -->|calls| 1a3a73b3_53a4_6327_8d25_8e235ffff058
  14d08361_a1ca_15aa_f611_6da8a79d1b82["getBeansInCycle()"]
  1a3a73b3_53a4_6327_8d25_8e235ffff058 -->|calls| 14d08361_a1ca_15aa_f611_6da8a79d1b82
  a0e16947_0cde_9e57_b133_f56437773f15["getCycleStart()"]
  1a3a73b3_53a4_6327_8d25_8e235ffff058 -->|calls| a0e16947_0cde_9e57_b133_f56437773f15
  33a9125c_7711_4cf5_f3b8_006ab34b6194["get()"]
  1a3a73b3_53a4_6327_8d25_8e235ffff058 -->|calls| 33a9125c_7711_4cf5_f3b8_006ab34b6194
  3ae8d562_745a_97e0_24b6_787b806ac0f2["toString()"]
  1a3a73b3_53a4_6327_8d25_8e235ffff058 -->|calls| 3ae8d562_745a_97e0_24b6_787b806ac0f2
  style 1a3a73b3_53a4_6327_8d25_8e235ffff058 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzer.java lines 96–117

	private String buildMessage(DependencyCycle dependencyCycle) {
		StringBuilder message = new StringBuilder();
		message.append(
				String.format("The dependencies of some of the beans in the application context form a cycle:%n%n"));
		List<BeanInCycle> beansInCycle = dependencyCycle.getBeansInCycle();
		boolean singleBean = beansInCycle.size() == 1;
		int cycleStart = dependencyCycle.getCycleStart();
		for (int i = 0; i < beansInCycle.size(); i++) {
			BeanInCycle beanInCycle = beansInCycle.get(i);
			if (i == cycleStart) {
				message.append(String.format(singleBean ? "┌──->──┐%n" : "┌─────┐%n"));
			}
			else if (i > 0) {
				String leftSide = (i < cycleStart) ? " " : "↑";
				message.append(String.format("%s     ↓%n", leftSide));
			}
			String leftSide = (i < cycleStart) ? " " : "|";
			message.append(String.format("%s  %s%n", leftSide, beanInCycle));
		}
		message.append(String.format(singleBean ? "└──<-──┘%n" : "└─────┘%n"));
		return message.toString();
	}

Domain

Subdomains

Calls

  • get()
  • getBeansInCycle()
  • getCycleStart()
  • toString()

Called By

Frequently Asked Questions

What does buildMessage() do?
buildMessage() is a function in the spring-boot codebase.
What does buildMessage() call?
buildMessage() calls 4 function(s): get, getBeansInCycle, getCycleStart, toString.
What calls buildMessage()?
buildMessage() is called by 1 function(s): analyze.

Analyze Your Own Codebase

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

Try Supermodel Free