Fix use of deprecated API

This commit is contained in:
Stephane Nicoll 2018-12-31 16:57:52 +01:00
parent b58df93e12
commit 8a4cd3d6a1

View File

@ -61,7 +61,7 @@ public class ProjectGenerationStatPublisher {
StatsProperties.Elastic elastic = statsProperties.getElastic(); StatsProperties.Elastic elastic = statsProperties.getElastic();
if (StringUtils.hasText(elastic.getUsername())) { if (StringUtils.hasText(elastic.getUsername())) {
this.restTemplate = restTemplateBuilder this.restTemplate = restTemplateBuilder
.basicAuthorization(elastic.getUsername(), elastic.getPassword()) .basicAuthentication(elastic.getUsername(), elastic.getPassword())
.build(); .build();
} }
else { else {