Skip to content

Commit

Permalink
Elasticsearch: Remove use of SpringBoot configuration spring.data.ela…
Browse files Browse the repository at this point in the history
…sticsearch.home.path

Spring Boot does not support starting embedded node since version 2.0
  • Loading branch information
murdos committed May 1, 2020
1 parent c371b68 commit f7fbeaf
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 64 deletions.
4 changes: 4 additions & 0 deletions generators/cleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ function cleanupOldServerFiles(generator, javaDir, testDir, mainResourceDir, tes
generator.removeFile(`${javaDir}config/ReactivePageableHandlerMethodArgumentResolver.java`);
generator.removeFile(`${javaDir}config/ReactiveSortHandlerMethodArgumentResolver.java`);
}

if (generator.isJhipsterVersionLessThan('6.10.0')) {
generator.removeFile(`${testDir}config/ElasticsearchTestConfiguration.java`);
}
}

/**
Expand Down
10 changes: 0 additions & 10 deletions generators/server/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -1119,16 +1119,6 @@ const serverFiles = {
},
],
},
{
condition: generator => generator.searchEngine === 'elasticsearch',
path: SERVER_TEST_SRC_DIR,
templates: [
{
file: 'package/config/ElasticsearchTestConfiguration.java',
renameTo: generator => `${generator.testDir}config/ElasticsearchTestConfiguration.java`,
},
],
},
],
serverJavaDomain: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,9 @@ spring:
keyspaceName: <%= baseName %>
<%_ } _%>
<%_ if (searchEngine === 'elasticsearch') { _%>
elasticsearch:
properties:
path:
home: <%= BUILD_DIR %>elasticsearch
elasticsearch:
rest:
uris: http://localhost:9200
<%_ } _%>
<%_ if (databaseType === 'couchbase') { _%>
couchbase:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ spring:
hibernate.hbm2ddl.auto: validate
hibernate.jdbc.time_zone: UTC
<%_ } _%>
<%_ if (databaseType === 'mongodb' || databaseType === 'cassandra' || searchEngine === 'elasticsearch') { _%>
<%_ if (databaseType === 'mongodb' || databaseType === 'cassandra') { _%>
data:
<%_ } _%>
<%_ if (databaseType === 'mongodb') { _%>
Expand All @@ -106,17 +106,6 @@ spring:
compression: NONE
keyspaceName: cassandra_unit_keyspace
<%_ } _%>
<%_ if (searchEngine === 'elasticsearch') { _%>
elasticsearch:
properties:
path:
home: <%= BUILD_DIR %>elasticsearch
<%_ if (cucumberTests) { _%>
# See https://github.com/jhipster/generator-jhipster/issues/10302
node:
max_local_storage_nodes: 2
<%_ } _%>
<%_ } _%>
<%_ if (databaseType === 'couchbase') { _%>
couchbase:
bucket:
Expand Down
1 change: 0 additions & 1 deletion test/utils/expected-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,6 @@ const expectedFiles = {

elasticsearch: [
`${DOCKER_DIR}elasticsearch.yml`,
`${SERVER_TEST_SRC_DIR}com/mycompany/myapp/config/ElasticsearchTestConfiguration.java`,
`${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/repository/search/UserSearchRepository.java`,
`${SERVER_TEST_SRC_DIR}com/mycompany/myapp/repository/search/UserSearchRepositoryMockConfiguration.java`,
],
Expand Down

0 comments on commit f7fbeaf

Please sign in to comment.