class InitializrStatsAutoConfiguration {

	private final StatsProperties statsProperties;

	InitializrStatsAutoConfiguration(StatsProperties statsProperties) {
		this.statsProperties = statsProperties;
	}

	@Bean
	@ConditionalOnBean(InitializrMetadataProvider.class)
	ProjectGenerationStatPublisher projectRequestStatHandler(RestTemplateBuilder restTemplateBuilder) {
		return new ProjectGenerationStatPublisher(new ProjectRequestDocumentFactory(), this.statsProperties,
				restTemplateBuilder, statsRetryTemplate());
	}

	@Bean
	@ConditionalOnMissingBean(name = "statsRetryTemplate")
	RetryTemplate statsRetryTemplate() {<FILL_FUNCTION_BODY>}

	static class ElasticUriCondition extends SpringBootCondition {

		@Override
		public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
			String elasticUri = context.getEnvironment().getProperty("initializr.stats.elastic.uri");
			if (StringUtils.hasText(elasticUri)) {
				return ConditionOutcome.match("initializr.stats.elastic.uri is set");
			}
			return ConditionOutcome.noMatch("initializr.stats.elastic.uri is not set");
		}

	}

}

		RetryTemplate retryTemplate = new RetryTemplate();
		ExponentialBackOffPolicy backOffPolicy = new ExponentialBackOffPolicy();
		backOffPolicy.setInitialInterval(3000L);
		backOffPolicy.setMultiplier(3);
		SimpleRetryPolicy retryPolicy = new SimpleRetryPolicy(this.statsProperties.getElastic().getMaxAttempts(),
				Collections.singletonMap(Exception.class, true));
		retryTemplate.setBackOffPolicy(backOffPolicy);
		retryTemplate.setRetryPolicy(retryPolicy);
		return retryTemplate;
	
<no_super_class>