diff --git a/generators/cleanup.js b/generators/cleanup.js index 85eb6728df24..a59706568a63 100644 --- a/generators/cleanup.js +++ b/generators/cleanup.js @@ -251,6 +251,9 @@ function cleanupOldServerFiles(generator, javaDir, testDir, mainResourceDir, tes generator.removeFile(`${javaDir}config/cassandra/CassandraConfiguration.java`); generator.removeFile(`${testDir}config/CassandraConfigurationIT.java`); } + if (generator.searchEngine === 'elasticsearch') { + generator.removeFile(`${testDir}config/ElasticsearchTestConfiguration.java`); + } } } diff --git a/generators/generator-constants.js b/generators/generator-constants.js index 399dab412e3f..9569deaf302b 100644 --- a/generators/generator-constants.js +++ b/generators/generator-constants.js @@ -65,7 +65,7 @@ const DOCKER_HAZELCAST_MANAGEMENT_CENTER = 'hazelcast/management-center:3.12.9'; const DOCKER_MEMCACHED = 'memcached:1.6.6-alpine'; const DOCKER_REDIS = 'redis:5.0.9'; // waiting for https://github.com/jhipster/generator-jhipster/issues/11678 const DOCKER_KEYCLOAK = 'jboss/keycloak:10.0.0'; // The version should match the attribute 'keycloakVersion' from /docker-compose/templates/realm-config/jhipster-realm.json.ejs and /server/templates/src/main/docker/config/realm-config/jhipster-realm.json.ejs -const DOCKER_ELASTICSEARCH = 'docker.elastic.co/elasticsearch/elasticsearch:6.8.8'; // The version should be coherent with the one from spring-data-elasticsearch project +const DOCKER_ELASTICSEARCH = 'docker.elastic.co/elasticsearch/elasticsearch:7.6.2'; // The version should be coherent with the one from spring-data-elasticsearch project const DOCKER_KAFKA = `confluentinc/cp-kafka:${KAFKA_VERSION}`; const DOCKER_ZOOKEEPER = `confluentinc/cp-zookeeper:${KAFKA_VERSION}`; const DOCKER_SONAR = 'sonarqube:8.3.1-community'; diff --git a/generators/heroku/templates/application-heroku.yml.ejs b/generators/heroku/templates/application-heroku.yml.ejs index fddb59318697..04bba033c5ef 100644 --- a/generators/heroku/templates/application-heroku.yml.ejs +++ b/generators/heroku/templates/application-heroku.yml.ejs @@ -63,14 +63,13 @@ spring: hikari: maximumPoolSize: 8 <%_ } _%> -<%_ if (prodDatabaseType === 'mongodb' || searchEngine === 'elasticsearch') { _%> +<%_ if (prodDatabaseType === 'mongodb') { _%> data: - <%_ if (prodDatabaseType === 'mongodb') { _%> mongodb: uri: ${MONGODB_URI}?authMode=scram-sha1 - <%_ } _%> - <%_ if (searchEngine === 'elasticsearch') { _%> - jest: - uri: ${BONSAI_URL} - <%_ } _%> +<%_ } _%> +<%_ if (searchEngine === 'elasticsearch') { _%> + elasticsearch: + rest: + uris: ${BONSAI_URL} <%_ } _%> diff --git a/generators/kubernetes-knative/templates/service.yml.ejs b/generators/kubernetes-knative/templates/service.yml.ejs index afe6c2d01bdc..ba0fea14b356 100644 --- a/generators/kubernetes-knative/templates/service.yml.ejs +++ b/generators/kubernetes-knative/templates/service.yml.ejs @@ -118,8 +118,6 @@ spec: value: <%= app.baseName.toLowerCase() %> <%_ } _%> <%_ if (app.searchEngine === 'elasticsearch') { _%> - - name: SPRING_DATA_JEST_URI - value: http://<%= app.baseName.toLowerCase() %>-elasticsearch.<%= kubernetesNamespace %>.svc.cluster.local:9200 - name: SPRING_ELASTICSEARCH_REST_URIS value: http://<%= app.baseName.toLowerCase() %>-elasticsearch.<%= kubernetesNamespace %>.svc.cluster.local:9200 <%_ } _%> diff --git a/generators/kubernetes/templates/deployment.yml.ejs b/generators/kubernetes/templates/deployment.yml.ejs index c830e28bcd4f..2ed05657f7c1 100644 --- a/generators/kubernetes/templates/deployment.yml.ejs +++ b/generators/kubernetes/templates/deployment.yml.ejs @@ -155,8 +155,6 @@ spec: value: <%= app.baseName.toLowerCase() %> <%_ } _%> <%_ if (app.searchEngine === 'elasticsearch') { _%> - - name: SPRING_DATA_JEST_URI - value: http://<%= app.baseName.toLowerCase() %>-elasticsearch.<%= kubernetesNamespace %>.svc.cluster.local:9200 - name: SPRING_ELASTICSEARCH_REST_URIS value: http://<%= app.baseName.toLowerCase() %>-elasticsearch.<%= kubernetesNamespace %>.svc.cluster.local:9200 <%_ } _%> diff --git a/generators/openshift/templates/deployment.yml.ejs b/generators/openshift/templates/deployment.yml.ejs index 6197963c59bc..e72dd393331f 100644 --- a/generators/openshift/templates/deployment.yml.ejs +++ b/generators/openshift/templates/deployment.yml.ejs @@ -205,8 +205,6 @@ objects: value: ${APPLICATION_NAME} <%_ } _%> <%_ if (app.searchEngine === 'elasticsearch') { _%> - - name: SPRING_DATA_JEST_URI - value: http://${APPLICATION_NAME}-elasticsearch:9200 - name: SPRING_ELASTICSEARCH_REST_URIS value: http://${APPLICATION_NAME}-elasticsearch:9200 <%_ } _%> diff --git a/generators/server/files.js b/generators/server/files.js index 09275bc769b5..4c6b1945d588 100644 --- a/generators/server/files.js +++ b/generators/server/files.js @@ -1107,16 +1107,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: [ { diff --git a/generators/server/templates/build.gradle.ejs b/generators/server/templates/build.gradle.ejs index faebb9bb8bb1..2db05eb6edda 100644 --- a/generators/server/templates/build.gradle.ejs +++ b/generators/server/templates/build.gradle.ejs @@ -404,15 +404,6 @@ dependencies { <%_ } _%> <%_ if (searchEngine === 'elasticsearch') { _%> implementation "org.springframework.boot:spring-boot-starter-data-elasticsearch" - <%_ if (!reactive) { _%> - // Spring Data Jest dependencies for Elasticsearch - implementation ("com.github.vanroy:spring-boot-starter-data-jest") { - exclude module: "commons-logging" - } - <%_ } _%> - // log4j2-mock needed to create embedded elasticsearch instance with SLF4J - runtimeOnly "de.dentrassi.elasticsearch:log4j2-mock:${log4j2_mock_version}" - // end of Spring Data Jest dependencies <%_ } _%> <%_ if (['mongodb', 'cassandra', 'couchbase'].includes(databaseType)) { _%> implementation "org.springframework.boot:spring-boot-starter-data-<%= databaseType %><% if (reactive) { %>-reactive<% } %>" diff --git a/generators/server/templates/pom.xml.ejs b/generators/server/templates/pom.xml.ejs index ac01dbe3bc2c..9da1e1651a74 100644 --- a/generators/server/templates/pom.xml.ejs +++ b/generators/server/templates/pom.xml.ejs @@ -674,27 +674,6 @@ org.springframework.boot spring-boot-starter-data-elasticsearch - <%_ if (!reactive) { _%> - - - com.github.vanroy - spring-boot-starter-data-jest - - - commons-logging - commons-logging - - - - <%_ } _%> - - - de.dentrassi.elasticsearch - log4j2-mock - ${log4j2-mock.version} - runtime - - <%_ } _%> <%_ if (['mongodb', 'cassandra', 'couchbase'].includes(databaseType)) { _%> diff --git a/generators/server/templates/src/main/docker/app.yml.ejs b/generators/server/templates/src/main/docker/app.yml.ejs index e6496b1f5740..b199811f24d4 100644 --- a/generators/server/templates/src/main/docker/app.yml.ejs +++ b/generators/server/templates/src/main/docker/app.yml.ejs @@ -78,7 +78,6 @@ services: - JHIPSTER_SLEEP=30 # gives time for other services to boot before the application <%_ } _%> <%_ if (searchEngine === 'elasticsearch') { _%> - - SPRING_DATA_JEST_URI=http://<%= baseName.toLowerCase() %>-elasticsearch:9200 - SPRING_ELASTICSEARCH_REST_URIS=http://<%= baseName.toLowerCase() %>-elasticsearch:9200 <%_ } _%> <%_ if (messageBroker === 'kafka') { _%> diff --git a/generators/server/templates/src/main/java/package/config/ElasticsearchConfiguration.java.ejs b/generators/server/templates/src/main/java/package/config/ElasticsearchConfiguration.java.ejs index bdbd62219089..75b92179b635 100644 --- a/generators/server/templates/src/main/java/package/config/ElasticsearchConfiguration.java.ejs +++ b/generators/server/templates/src/main/java/package/config/ElasticsearchConfiguration.java.ejs @@ -18,30 +18,15 @@ -%> package <%= packageName %>.config; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; -<%_ if (!reactive) { _%> -import com.github.vanroy.springdata.jest.JestElasticsearchTemplate; -import com.github.vanroy.springdata.jest.mapper.DefaultJestResultsMapper; -import io.searchbox.client.JestClient; -<%_ } _%> -import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchProperties; -import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -<%_ if (!reactive) { _%> -import org.springframework.context.annotation.Primary; -import org.springframework.data.elasticsearch.core.ElasticsearchOperations; -<%_ } _%> -import org.springframework.data.elasticsearch.core.EntityMapper; -<%_ if (!reactive) { _%> -import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter; -<%_ } _%> -<%_ if (databaseType === 'mongodb' || !reactive) { _%> -import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext; -<%_ } _%> +import org.springframework.core.convert.converter.Converter; +import org.springframework.data.convert.ReadingConverter; +import org.springframework.data.convert.WritingConverter; +import org.springframework.data.elasticsearch.config.ElasticsearchConfigurationSupport; +import org.springframework.data.elasticsearch.core.convert.ElasticsearchCustomConversions; <%_ if (databaseType === 'mongodb') { _%> +import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext; import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentProperty; import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchPersistentProperty; import org.springframework.data.mapping.PersistentEntity; @@ -49,90 +34,103 @@ import org.springframework.data.mapping.model.Property; import org.springframework.data.mapping.model.SimpleTypeHolder; import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchPersistentEntity; <%_ } _%> -import org.springframework.data.mapping.MappingException; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; +import java.time.Instant; +import java.time.LocalDate; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.util.Arrays; @Configuration -@EnableConfigurationProperties(ElasticsearchProperties.class) -public class ElasticsearchConfiguration { - - private ObjectMapper mapper; - - public ElasticsearchConfiguration(ObjectMapper mapper) { - this.mapper = mapper; - } +public class ElasticsearchConfiguration extends ElasticsearchConfigurationSupport { @Bean - public EntityMapper getEntityMapper() { - return new CustomEntityMapper(mapper); - } -<%_ if (databaseType === 'mongodb') { _%> - - @Bean - SimpleElasticsearchMappingContext mappingContext() { - return new CustomElasticsearchMappingContext(); + @Override + public ElasticsearchCustomConversions elasticsearchCustomConversions() { + return new ElasticsearchCustomConversions( + Arrays.asList( + new ZonedDateTimeWritingConverter(), + new ZonedDateTimeReadingConverter(), + new InstantWritingConverter(), + new InstantReadingConverter(), + new LocalDateWritingConverter(), + new LocalDateReadingConverter() + ) + ); } -<%_ } _%> -<%_ if (!reactive) { _%> - @Bean - @Primary - public ElasticsearchOperations elasticsearchTemplate(JestClient jestClient, - ElasticsearchConverter elasticsearchConverter, - SimpleElasticsearchMappingContext mappingContext, - EntityMapper entityMapper) { - return new JestElasticsearchTemplate( - jestClient, - elasticsearchConverter, - new DefaultJestResultsMapper(mappingContext, entityMapper)); + @WritingConverter + static class ZonedDateTimeWritingConverter implements Converter { + @Override + public String convert(ZonedDateTime source) { + if (source == null) { + return null; + } + return source.toInstant().toString(); + } } -<%_ } _%> - - public class CustomEntityMapper implements EntityMapper { - - private ObjectMapper objectMapper; - public CustomEntityMapper(ObjectMapper objectMapper) { - this.objectMapper = objectMapper; - objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - objectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true); - objectMapper.configure(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS, true); - objectMapper.configure(SerializationFeature.INDENT_OUTPUT, false); - objectMapper.configure(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS, true); + @ReadingConverter + static class ZonedDateTimeReadingConverter implements Converter { + @Override + public ZonedDateTime convert(String source) { + if (source == null) { + return null; + } + return Instant.parse(source).atZone(ZoneId.systemDefault()); } + } + @WritingConverter + static class InstantWritingConverter implements Converter { @Override - public String mapToString(Object object) throws IOException { - return objectMapper.writeValueAsString(object); + public String convert(Instant source) { + if (source == null) { + return null; + } + return source.toString(); } + } + @ReadingConverter + static class InstantReadingConverter implements Converter { @Override - public T mapToObject(String source, Class clazz) throws IOException { - return objectMapper.readValue(source, clazz); + public Instant convert(String source) { + if (source == null) { + return null; + } + return Instant.parse(source); } + } + @WritingConverter + static class LocalDateWritingConverter implements Converter { @Override - public Map mapObject(Object source) { - try { - return objectMapper.readValue(mapToString(source), HashMap.class); - } catch (IOException e) { - throw new MappingException(e.getMessage(), e); + public String convert(LocalDate source) { + if (source == null) { + return null; } + return source.toString(); } + } + @ReadingConverter + static class LocalDateReadingConverter implements Converter { @Override - public T readObject(Map source, Class targetType) { - try { - return mapToObject(mapToString(source), targetType); - } catch (IOException e) { - throw new MappingException(e.getMessage(), e); + public LocalDate convert(String source) { + if (source == null) { + return null; } + return LocalDate.parse(source); } } +<%_ if (databaseType === 'mongodb') { _%> + @Bean + SimpleElasticsearchMappingContext mappingContext() { + return new CustomElasticsearchMappingContext(); + } +<%_ } _%> } <%_ if (databaseType === 'mongodb') { _%> diff --git a/generators/server/templates/src/main/resources/config/application-dev.yml.ejs b/generators/server/templates/src/main/resources/config/application-dev.yml.ejs index 4e8c8c3d6343..4657f0deffcb 100644 --- a/generators/server/templates/src/main/resources/config/application-dev.yml.ejs +++ b/generators/server/templates/src/main/resources/config/application-dev.yml.ejs @@ -174,10 +174,9 @@ spring: local-datacenter: datacenter1 <%_ } _%> <%_ if (searchEngine === 'elasticsearch') { _%> - elasticsearch: - properties: - path: - home: <%= BUILD_DIR %>elasticsearch + elasticsearch: + rest: + uris: http://localhost:9200 <%_ } _%> <%_ if (databaseType === 'couchbase') { _%> couchbase: diff --git a/generators/server/templates/src/main/resources/config/application-prod.yml.ejs b/generators/server/templates/src/main/resources/config/application-prod.yml.ejs index b0622f20a5d1..78246186d202 100644 --- a/generators/server/templates/src/main/resources/config/application-prod.yml.ejs +++ b/generators/server/templates/src/main/resources/config/application-prod.yml.ejs @@ -123,7 +123,7 @@ spring: <%_ } _%> show-sql: false <%_ } _%> - <%_ if (databaseType === 'mongodb' || databaseType === 'cassandra' || searchEngine === 'elasticsearch') { _%> + <%_ if (databaseType === 'mongodb' || databaseType === 'cassandra' || (searchEngine === 'elasticsearch' && reactive)) { _%> data: <%_ } _%> <%_ if (databaseType === 'mongodb') { _%> @@ -139,18 +139,15 @@ spring: local-datacenter: datacenter1 <%_ } _%> <%_ if (searchEngine === 'elasticsearch') { _%> - <%_ if (!reactive) { _%> - jest: - uri: http://localhost:9200 - # see https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-nosql.html#boot-features-connecting-to-elasticsearch-jest - elasticsearch: - rest: - uris: http://localhost:9200 - <%_ } else { _%> + <%_ if (reactive) { _%> elasticsearch: client: reactive: endpoints: localhost:9200 + <%_ } else { _%> + elasticsearch: + rest: + uris: http://localhost:9200 <%_ } _%> <%_ } _%> <%_ if (databaseType === 'couchbase') { _%> diff --git a/generators/server/templates/src/main/resources/config/application.yml.ejs b/generators/server/templates/src/main/resources/config/application.yml.ejs index babeb7431ad0..86101f7f148f 100644 --- a/generators/server/templates/src/main/resources/config/application.yml.ejs +++ b/generators/server/templates/src/main/resources/config/application.yml.ejs @@ -153,10 +153,7 @@ management: enabled: true spring: - <%_ if (searchEngine === 'elasticsearch' && !reactive) { _%> - autoconfigure: - exclude: <% if (databaseType === 'sql' && messageBroker === 'kafka') { %>org.springframework.boot.actuate.autoconfigure.metrics.jdbc.DataSourcePoolMetricsAutoConfiguration,<% } %>org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration,org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration - <%_ } else if (databaseType === 'sql' && messageBroker === 'kafka') { _%> + <%_ if (databaseType === 'sql' && messageBroker === 'kafka') { _%> autoconfigure: exclude: org.springframework.boot.actuate.autoconfigure.metrics.jdbc.DataSourcePoolMetricsAutoConfiguration <%_ } _%> diff --git a/generators/server/templates/src/test/java/package/config/ElasticsearchTestConfiguration.java.ejs b/generators/server/templates/src/test/java/package/config/ElasticsearchTestConfiguration.java.ejs deleted file mode 100644 index 4cacbc5e1733..000000000000 --- a/generators/server/templates/src/test/java/package/config/ElasticsearchTestConfiguration.java.ejs +++ /dev/null @@ -1,37 +0,0 @@ -<%# -Copyright 2013-2020 the original author or authors from the JHipster project. - -This file is part of the JHipster project, see https://jhipster.github.io/ -for more information. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. --%> -package <%=packageName%>.config; - -import org.assertj.core.util.Files; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Primary; - -import java.io.File; - -@Configuration -public class ElasticsearchTestConfiguration { - @Autowired - public void elasticsearchProperties(ElasticsearchProperties elasticsearchProperties) { - File tempdir = Files.newTemporaryFolder(); - elasticsearchProperties.getProperties().put("path.home", tempdir.getAbsolutePath()); - } -} diff --git a/generators/server/templates/src/test/resources/config/application.yml.ejs b/generators/server/templates/src/test/resources/config/application.yml.ejs index 3fcfd9f3061d..1bb2c41aa828 100644 --- a/generators/server/templates/src/test/resources/config/application.yml.ejs +++ b/generators/server/templates/src/test/resources/config/application.yml.ejs @@ -94,7 +94,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') { _%> @@ -110,17 +110,6 @@ spring: keyspace-name: cassandra_unit_keyspace local-datacenter: datacenter1 <%_ } _%> - <%_ 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: diff --git a/test/heroku.spec.js b/test/heroku.spec.js index 3aaea2ede363..394e7cd07029 100644 --- a/test/heroku.spec.js +++ b/test/heroku.spec.js @@ -264,8 +264,6 @@ describe('JHipster Heroku Sub Generator', () => { assert.file(expectedFiles.monolith); assert.fileContent('.yo-rc.json', '"herokuDeployType": "jar"'); assert.fileContent(`${constants.SERVER_MAIN_RES_DIR}/config/application-heroku.yml`, 'datasource:'); - assert.fileContent(`${constants.SERVER_MAIN_RES_DIR}/config/application-heroku.yml`, 'jest:'); - assert.fileContent(`${constants.SERVER_MAIN_RES_DIR}/config/application-heroku.yml`, 'data:'); assert.noFileContent(`${constants.SERVER_MAIN_RES_DIR}/config/application-heroku.yml`, 'mongodb:'); }); }); diff --git a/test/templates/compose/03-psql/src/main/docker/app.yml b/test/templates/compose/03-psql/src/main/docker/app.yml index eaf701cb22b3..dee682b93847 100644 --- a/test/templates/compose/03-psql/src/main/docker/app.yml +++ b/test/templates/compose/03-psql/src/main/docker/app.yml @@ -6,7 +6,6 @@ services: - SPRING_PROFILES_ACTIVE=prod - SPRING_CLOUD_CONFIG_URI=http://admin:admin@jhipster-registry:8761/config - SPRING_DATASOURCE_URL=jdbc:postgresql://mspsql-postgresql:5432/mspsql - - SPRING_DATA_JEST_URI=http://mspsql-elasticsearch:9200 - SPRING_ELASTICSEARCH_REST_URIS=http://mspsql-elasticsearch:9200 mspsql-postgresql: extends: diff --git a/test/utils/expected-files.js b/test/utils/expected-files.js index b8865e646df4..b50e02c8b195 100644 --- a/test/utils/expected-files.js +++ b/test/utils/expected-files.js @@ -785,7 +785,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`, ],