https://github.com/sercheo87/springboot-elastic
This example use Spring Boot and persist data on Elastic Search.
https://github.com/sercheo87/springboot-elastic
elasticsearch spring-boot
Last synced: 2 months ago
JSON representation
This example use Spring Boot and persist data on Elastic Search.
- Host: GitHub
- URL: https://github.com/sercheo87/springboot-elastic
- Owner: sercheo87
- License: apache-2.0
- Created: 2019-10-12T07:23:21.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-12T07:41:14.000Z (about 6 years ago)
- Last Synced: 2025-03-23T22:20:35.306Z (9 months ago)
- Topics: elasticsearch, spring-boot
- Language: Java
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.adoc
- License: LICENSE
Awesome Lists containing this project
README
= SpringBoot with Elastic Search
== Introduction
This example use Spring Boot and persist data on Elastic Search. The test execute a _CRUD_ of model link:./employee-elastic/src/main/java/com/spring/elastic/model/Employee.java[Employee].
== Docker services
For start services execute.
[source,bash]
----
docker-compose up -d
----
Access the http://localhost:5000[Manager Elastic Search - elastichq] and connect to *_http://elasticsearch.srv.com:9200_*.
Container Elastic Search:
include::docker-compose.yml[tag=server]
Container Elastic-HQ:
include::docker-compose.yml[tag=manager]
== Testing running
The test when run up in background container of Elastic Search.
Run test:
[source,bash]
----
mvn test
----
Define container with specific image docker and version:
[source,bash]
----
include::employee-elastic/src/test/java/com/spring/elastic/repository/EmployeeRepositoryTest.java[tags=container]
----
Define connection between app and Elastic Search with container testing:
[source,bash]
----
include::employee-elastic/src/test/java/com/spring/elastic/repository/EmployeeRepositoryTest.java[tags=cluster]
----