generateProject() — spring-boot Function Reference
Architecture documentation for the generateProject() function in ProjectGenerator.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD e0179de4_bf5b_0060_a460_319095eca217["generateProject()"] c1199054_9d68_aebe_596b_101b4ef553fa["shouldExtract()"] e0179de4_bf5b_0060_a460_319095eca217 -->|calls| c1199054_9d68_aebe_596b_101b4ef553fa 020a2c63_4625_558c_773f_1caf07c35c30["isZipArchive()"] e0179de4_bf5b_0060_a460_319095eca217 -->|calls| 020a2c63_4625_558c_773f_1caf07c35c30 cad00a62_1149_ff06_09ba_cd11a292e928["extractProject()"] e0179de4_bf5b_0060_a460_319095eca217 -->|calls| cad00a62_1149_ff06_09ba_cd11a292e928 fc88690e_99c9_f856_76c6_c71d50291cb8["info()"] e0179de4_bf5b_0060_a460_319095eca217 -->|calls| fc88690e_99c9_f856_76c6_c71d50291cb8 b7a98a55_de52_9632_d05c_7f67366239c3["writeProject()"] e0179de4_bf5b_0060_a460_319095eca217 -->|calls| b7a98a55_de52_9632_d05c_7f67366239c3 style e0179de4_bf5b_0060_a460_319095eca217 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerator.java lines 48–67
void generateProject(ProjectGenerationRequest request, boolean force) throws IOException {
ProjectGenerationResponse response = this.initializrService.generate(request);
String fileName = (request.getOutput() != null) ? request.getOutput() : response.getFileName();
if (shouldExtract(request, response)) {
if (isZipArchive(response)) {
extractProject(response, request.getOutput(), force);
return;
}
else {
Log.info("Could not extract '" + response.getContentType() + "'");
// Use value from the server since we can't extract it
fileName = response.getFileName();
}
}
if (fileName == null) {
throw new ReportableException("Could not save the project, the server did not set a preferred "
+ "file name and no location was set. Specify the output location for the project.");
}
writeProject(response, fileName, force);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does generateProject() do?
generateProject() is a function in the spring-boot codebase.
What does generateProject() call?
generateProject() calls 5 function(s): extractProject, info, isZipArchive, shouldExtract, writeProject.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free