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

setup() — spring-boot Function Reference

Architecture documentation for the setup() function in LogbackLoggingSystemTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  dc33459c_3010_a533_be79_c789260d731a["setup()"]
  fdbd1b73_3c9a_1ec8_2ac3_04f41fb0df51["cleanUp()"]
  dc33459c_3010_a533_be79_c789260d731a -->|calls| fdbd1b73_3c9a_1ec8_2ac3_04f41fb0df51
  ceb0c1b2_caf2_c9b2_e27f_70b95f8bfc7c["getSharedInstance()"]
  dc33459c_3010_a533_be79_c789260d731a -->|calls| ceb0c1b2_caf2_c9b2_e27f_70b95f8bfc7c
  1c70a669_b986_1d08_11e5_0f5b58ad7e27["LoggingInitializationContext()"]
  dc33459c_3010_a533_be79_c789260d731a -->|calls| 1c70a669_b986_1d08_11e5_0f5b58ad7e27
  style dc33459c_3010_a533_be79_c789260d731a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackLoggingSystemTests.java lines 125–138

	@BeforeEach
	void setup() {
		for (LoggingSystemProperty property : LoggingSystemProperty.values()) {
			System.getProperties().remove(property.getEnvironmentVariableName());
		}
		this.systemPropertyNames = new HashSet<>(System.getProperties().keySet());
		this.loggingSystem.cleanUp();
		this.logger = ((LoggerContext) LoggerFactory.getILoggerFactory()).getLogger(getClass());
		this.environment = new MockEnvironment();
		ConversionService conversionService = ApplicationConversionService.getSharedInstance();
		this.environment.setConversionService((ConfigurableConversionService) conversionService);
		this.initializationContext = new LoggingInitializationContext(this.environment);
		this.loggingSystem.setStatusPrinterStream(System.out);
	}

Domain

Subdomains

Frequently Asked Questions

What does setup() do?
setup() is a function in the spring-boot codebase.
What does setup() call?
setup() calls 3 function(s): LoggingInitializationContext, cleanUp, getSharedInstance.

Analyze Your Own Codebase

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

Try Supermodel Free