List of usage examples for org.springframework.boot.cli.command.init ProjectGenerationRequest getServiceUrl
String getServiceUrl()
From source file:org.springframework.boot.cli.command.init.InitializrService.java
/** * Generate a project based on the specified {@link ProjectGenerationRequest}. * @param request the generation request * @return an entity defining the project * @throws IOException if generation fails *//* w ww. j a v a2 s. co m*/ public ProjectGenerationResponse generate(ProjectGenerationRequest request) throws IOException { Log.info("Using service at " + request.getServiceUrl()); InitializrServiceMetadata metadata = loadMetadata(request.getServiceUrl()); URI url = request.generateUrl(metadata); CloseableHttpResponse httpResponse = executeProjectGenerationRequest(url); HttpEntity httpEntity = httpResponse.getEntity(); validateResponse(httpResponse, request.getServiceUrl()); return createResponse(httpResponse, httpEntity); }