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

waitForSpringApplication() — spring-boot Function Reference

Architecture documentation for the waitForSpringApplication() function in StartMojo.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  280c4ffd_495b_5cb5_9790_6e4753a0a34f["waitForSpringApplication()"]
  6445a832_173d_dc63_c65f_49a00800a1b2["run()"]
  6445a832_173d_dc63_c65f_49a00800a1b2 -->|calls| 280c4ffd_495b_5cb5_9790_6e4753a0a34f
  cfa553e2_cf47_c4fa_a10e_b7fd43198087["execute()"]
  280c4ffd_495b_5cb5_9790_6e4753a0a34f -->|calls| cfa553e2_cf47_c4fa_a10e_b7fd43198087
  fa77f08d_3630_4584_3366_26d51e84f8c0["CreateJmxConnector()"]
  280c4ffd_495b_5cb5_9790_6e4753a0a34f -->|calls| fa77f08d_3630_4584_3366_26d51e84f8c0
  6f4a8945_735a_1bc9_fbb2_db6e938c4785["doWaitForSpringApplication()"]
  280c4ffd_495b_5cb5_9790_6e4753a0a34f -->|calls| 6f4a8945_735a_1bc9_fbb2_db6e938c4785
  style 280c4ffd_495b_5cb5_9790_6e4753a0a34f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

build-plugin/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java lines 137–157

	private void waitForSpringApplication() throws MojoFailureException, MojoExecutionException {
		try {
			getLog().debug("Connecting to local MBeanServer at port " + this.jmxPort);
			try (JMXConnector connector = execute(this.wait, this.maxAttempts, new CreateJmxConnector(this.jmxPort))) {
				if (connector == null) {
					throw new MojoExecutionException("JMX MBean server was not reachable before the configured "
							+ "timeout (" + (this.wait * this.maxAttempts) + "ms");
				}
				getLog().debug("Connected to local MBeanServer at port " + this.jmxPort);
				MBeanServerConnection connection = connector.getMBeanServerConnection();
				doWaitForSpringApplication(connection);
			}
		}
		catch (IOException ex) {
			throw new MojoFailureException("Could not contact Spring Boot application via JMX on port " + this.jmxPort
					+ ". Please make sure that no other process is using that port", ex);
		}
		catch (Exception ex) {
			throw new MojoExecutionException("Failed to connect to MBean server at port " + this.jmxPort, ex);
		}
	}

Domain

Subdomains

Calls

Called By

  • run()

Frequently Asked Questions

What does waitForSpringApplication() do?
waitForSpringApplication() is a function in the spring-boot codebase.
What does waitForSpringApplication() call?
waitForSpringApplication() calls 3 function(s): CreateJmxConnector, doWaitForSpringApplication, execute.
What calls waitForSpringApplication()?
waitForSpringApplication() is called by 1 function(s): run.

Analyze Your Own Codebase

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

Try Supermodel Free