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

loadServiceCapabilities() — spring-boot Function Reference

Architecture documentation for the loadServiceCapabilities() function in InitializrService.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  f177244f_956d_b9a1_6675_af2b7b1ec51c["loadServiceCapabilities()"]
  603a0215_5d33_38af_cdcd_0430c320f36c["execute()"]
  f177244f_956d_b9a1_6675_af2b7b1ec51c -->|calls| 603a0215_5d33_38af_cdcd_0430c320f36c
  2dca292a_e300_14f4_3a67_6e7bcf95bf27["validateResponse()"]
  f177244f_956d_b9a1_6675_af2b7b1ec51c -->|calls| 2dca292a_e300_14f4_3a67_6e7bcf95bf27
  f517fd53_a713_34e0_cd3a_d72f34720212["getContent()"]
  f177244f_956d_b9a1_6675_af2b7b1ec51c -->|calls| f517fd53_a713_34e0_cd3a_d72f34720212
  108f36d9_1823_32ed_f1e2_edba5402f9e5["parseJsonMetadata()"]
  f177244f_956d_b9a1_6675_af2b7b1ec51c -->|calls| 108f36d9_1823_32ed_f1e2_edba5402f9e5
  style f177244f_956d_b9a1_6675_af2b7b1ec51c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java lines 121–132

	Object loadServiceCapabilities(String serviceUrl) throws IOException {
		HttpGet request = new HttpGet(serviceUrl);
		request.setHeader(new BasicHeader(HttpHeaders.ACCEPT, ACCEPT_SERVICE_CAPABILITIES));
		ClassicHttpResponse httpResponse = execute(request, URI.create(serviceUrl), "retrieve help");
		validateResponse(httpResponse, serviceUrl);
		HttpEntity httpEntity = httpResponse.getEntity();
		ContentType contentType = ContentType.create(httpEntity.getContentType());
		if (contentType.getMimeType().equals("text/plain")) {
			return getContent(httpEntity);
		}
		return parseJsonMetadata(httpEntity);
	}

Domain

Subdomains

Frequently Asked Questions

What does loadServiceCapabilities() do?
loadServiceCapabilities() is a function in the spring-boot codebase.
What does loadServiceCapabilities() call?
loadServiceCapabilities() calls 4 function(s): execute, getContent, parseJsonMetadata, validateResponse.

Analyze Your Own Codebase

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

Try Supermodel Free