Skip to content

Commit

Permalink
Merge pull request #264 from Open-MBEE/fix/elastic-default-cred
Browse files Browse the repository at this point in the history
Set default elastic cred
  • Loading branch information
dlamoris authored Feb 26, 2024
2 parents e40e8f0 + d11ce49 commit f0071e2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public class ElasticsearchConfig {
@Value("${elasticsearch.http}")
private String elasticsearchHttp;

@Value("${elasticsearch.password}")
@Value("${elasticsearch.password:#{null}}")
private String elasticsearchPassword;
@Value("${elasticsearch.username}")
@Value("${elasticsearch.username:#{null}}")
private String elasticsearchUsername;

@Bean(name = "clientElastic", destroyMethod = "close")
public RestHighLevelClient restClient() {



RestClientBuilder builder = RestClient.builder(new HttpHost(elasticsearchHost, elasticsearchPort, elasticsearchHttp));
builder.setRequestConfigCallback(requestConfigBuilder -> requestConfigBuilder.setConnectTimeout(10000).setSocketTimeout(1000000));
Expand Down

0 comments on commit f0071e2

Please sign in to comment.