execute() — spring-boot Function Reference
Architecture documentation for the execute() function in StartMojo.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD cfa553e2_cf47_c4fa_a10e_b7fd43198087["execute()"] 280c4ffd_495b_5cb5_9790_6e4753a0a34f["waitForSpringApplication()"] 280c4ffd_495b_5cb5_9790_6e4753a0a34f -->|calls| cfa553e2_cf47_c4fa_a10e_b7fd43198087 6f4a8945_735a_1bc9_fbb2_db6e938c4785["doWaitForSpringApplication()"] 6f4a8945_735a_1bc9_fbb2_db6e938c4785 -->|calls| cfa553e2_cf47_c4fa_a10e_b7fd43198087 0d949382_acd2_e21e_46cc_e65969f065fc["call()"] cfa553e2_cf47_c4fa_a10e_b7fd43198087 -->|calls| 0d949382_acd2_e21e_46cc_e65969f065fc style cfa553e2_cf47_c4fa_a10e_b7fd43198087 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 184–205
public <T> T execute(long wait, int maxAttempts, Callable<@Nullable T> callback) throws Exception {
getLog().debug("Waiting for spring application to start...");
for (int i = 0; i < maxAttempts; i++) {
T result = callback.call();
if (result != null) {
return result;
}
String message = "Spring application is not ready yet, waiting " + wait + "ms (attempt " + (i + 1) + ")";
getLog().debug(message);
synchronized (this.lock) {
try {
this.lock.wait(wait);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new IllegalStateException("Interrupted while waiting for Spring Boot app to start.");
}
}
}
throw new MojoExecutionException(
"Spring application did not start before the configured timeout (" + (wait * maxAttempts) + "ms");
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does execute() do?
execute() is a function in the spring-boot codebase.
What does execute() call?
execute() calls 1 function(s): call.
What calls execute()?
execute() is called by 2 function(s): doWaitForSpringApplication, waitForSpringApplication.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free