findLaunchScript() — spring-boot Function Reference
Architecture documentation for the findLaunchScript() function in CommandLineInvoker.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD c2e5c123_1a7f_1e5a_0e91_d4a615b494d9["findLaunchScript()"] c9576a15_c512_2967_afcd_1ceac24a2c93["runCliProcess()"] c9576a15_c512_2967_afcd_1ceac24a2c93 -->|calls| c2e5c123_1a7f_1e5a_0e91_d4a615b494d9 f3c73e90_76d6_b37f_4788_db6407a44576["isWindows()"] c2e5c123_1a7f_1e5a_0e91_d4a615b494d9 -->|calls| f3c73e90_76d6_b37f_4788_db6407a44576 style c2e5c123_1a7f_1e5a_0e91_d4a615b494d9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
cli/spring-boot-cli/src/intTest/java/org/springframework/boot/cli/infrastructure/CommandLineInvoker.java lines 82–111
private File findLaunchScript() throws IOException {
File unpacked = new File(this.temp, "unpacked-cli");
if (!unpacked.isDirectory()) {
File zip = new File(new BuildOutput(getClass()).getRootLocation(),
"distributions/spring-boot-cli-" + Versions.getBootVersion() + "-bin.zip");
try (ZipInputStream input = new ZipInputStream(new FileInputStream(zip))) {
ZipEntry entry;
while ((entry = input.getNextEntry()) != null) {
File file = new File(unpacked, entry.getName());
if (entry.isDirectory()) {
file.mkdirs();
}
else {
file.getParentFile().mkdirs();
try (FileOutputStream output = new FileOutputStream(file)) {
StreamUtils.copy(input, output);
if (entry.getName().endsWith("/bin/spring")) {
file.setExecutable(true);
}
}
}
}
}
}
File bin = new File(unpacked.listFiles()[0], "bin");
File launchScript = new File(bin, isWindows() ? "spring.bat" : "spring");
Assert.state(launchScript.exists() && launchScript.isFile(),
() -> "Could not find CLI launch script " + launchScript.getAbsolutePath());
return launchScript;
}
Domain
Subdomains
Calls
- isWindows()
Called By
Source
Frequently Asked Questions
What does findLaunchScript() do?
findLaunchScript() is a function in the spring-boot codebase.
What does findLaunchScript() call?
findLaunchScript() calls 1 function(s): isWindows.
What calls findLaunchScript()?
findLaunchScript() is called by 1 function(s): runCliProcess.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free