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

init() — spring-boot Function Reference

Architecture documentation for the init() function in LoggingApplicationListenerTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  02061150_938d_939c_4bbc_e795406d267c["init()"]
  b21aabff_7677_28df_125a_1805aeda834e["multicastEvent()"]
  02061150_938d_939c_4bbc_e795406d267c -->|calls| b21aabff_7677_28df_125a_1805aeda834e
  be3bab95_2d77_cc83_e74d_439204d631d0["ApplicationStartingEvent()"]
  02061150_938d_939c_4bbc_e795406d267c -->|calls| be3bab95_2d77_cc83_e74d_439204d631d0
  16b51c89_dde4_bfa7_4c6d_cd813dd33ba3["SpringApplication()"]
  02061150_938d_939c_4bbc_e795406d267c -->|calls| 16b51c89_dde4_bfa7_4c6d_cd813dd33ba3
  a74a6404_ac0b_ef50_4554_48366dd90b97["getEnvironment()"]
  02061150_938d_939c_4bbc_e795406d267c -->|calls| a74a6404_ac0b_ef50_4554_48366dd90b97
  660de5d2_3b68_dc8d_57eb_76ad92696657["attach()"]
  02061150_938d_939c_4bbc_e795406d267c -->|calls| 660de5d2_3b68_dc8d_57eb_76ad92696657
  style 02061150_938d_939c_4bbc_e795406d267c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/logging/LoggingApplicationListenerTests.java lines 132–142

	@BeforeEach
	void init(CapturedOutput output) throws IOException {
		this.systemPropertyNames = new HashSet<>(System.getProperties().keySet());
		this.output = output;
		this.logFile = new File(this.tempDir.toFile(), "foo.log");
		LogManager.getLogManager().readConfiguration(JavaLoggingSystem.class.getResourceAsStream("logging.properties"));
		multicastEvent(new ApplicationStartingEvent(this.bootstrapContext, new SpringApplication(), NO_ARGS));
		new File(this.tempDir.toFile(), "spring.log").delete();
		ConfigurableEnvironment environment = this.context.getEnvironment();
		ConfigurationPropertySources.attach(environment);
	}

Domain

Subdomains

Frequently Asked Questions

What does init() do?
init() is a function in the spring-boot codebase.
What does init() call?
init() calls 5 function(s): ApplicationStartingEvent, SpringApplication, attach, getEnvironment, multicastEvent.

Analyze Your Own Codebase

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

Try Supermodel Free