Skip to content

Commit

Permalink
Allow multiple elasticsearch hosts (#570)
Browse files Browse the repository at this point in the history
Signed-off-by: LE SAULNIER Kevin <[email protected]>
  • Loading branch information
klesaulnier authored Dec 12, 2024
1 parent e18e64f commit 8436f8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 68 deletions.

This file was deleted.

12 changes: 6 additions & 6 deletions src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ gridsuite:
spring:
rabbitmq:
addresses: localhost
data:
elasticsearch:
host: localhost
## to fill if authentication is needed
# user:
# password:
elasticsearch:
uris:
- http://localhost:9200
## to fill if authentication is needed
# username:
# password:

powsybl-ws:
database:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public void postConstruct() {
envMap.put("action.auto_create_index", "false");
elasticsearchContainer.start();

System.setProperty("spring.data.elasticsearch.embedded", Boolean.toString(true));
System.setProperty("spring.data.elasticsearch.embedded.port", Integer.toString(elasticsearchContainer.getMappedPort(9200)));
System.setProperty("spring.elasticsearch.uris", "localhost:".concat(Integer.toString(elasticsearchContainer.getMappedPort(9200))));
}

@PreDestroy
Expand Down

0 comments on commit 8436f8d

Please sign in to comment.