class AbstractMetadataController {

	protected final InitializrMetadataProvider metadataProvider;

	private Boolean forceSsl;

	protected AbstractMetadataController(InitializrMetadataProvider metadataProvider) {
		this.metadataProvider = metadataProvider;
	}

	/**
	 * Generate a full URL of the service, mostly for use in templates.
	 * @return the app URL
	 * @see io.spring.initializr.metadata.InitializrConfiguration.Env#isForceSsl()
	 */
	protected String generateAppUrl() {<FILL_FUNCTION_BODY>}

	protected String createUniqueId(String content) {
		StringBuilder builder = new StringBuilder();
		DigestUtils.appendMd5DigestAsHex(content.getBytes(StandardCharsets.UTF_8), builder);
		return builder.toString();
	}

	private boolean isForceSsl() {
		if (this.forceSsl == null) {
			this.forceSsl = this.metadataProvider.get().getConfiguration().getEnv().isForceSsl();
		}
		return this.forceSsl;

	}

}

		ServletUriComponentsBuilder builder = ServletUriComponentsBuilder.fromCurrentServletMapping();
		if (isForceSsl()) {
			builder.scheme("https");
		}
		return builder.build().toString();
	
<no_super_class>