This project is to demonstrate how we can use Elasticsearch with Spring Boot, as well as we will also dockerize the Spring Boot App, Elasticsearch, and Kibana all together.
Here we have two indexes customer and order, we are storing them in the Elasticsearch and I have developed APIs in the Spring Boot so we can easily manage these indexes in the Elasticsearch, you will get the more information on how to access these APIs in the following section.
- JDK 14
- Elasticsearch
- Git
- JDK 14
- Spring Boot
- Elasticsearch
- Gradle
- Lombok
- MapStruct
- Apache Commons
- Swagger
- IDE
-
Download the zip or clone the Git repository
-
Start Elasticsearch
-
Config Elasticsearch properties from
elastic-search-demo/src/main/resources/application-dev.yml
if needed. -
Go to the
elastic-search-demo/
directory and open the terminal and simply run the following command to run the appIn Windows:
gradlew bootrun
In Linux:
bash gradlew bootrun
And we are done, now you can open the swagger to access the APIs: Swagger
In case if you have docker in your machine then just go inside the elastic-search-demo directory and execute the following command:
docker-compose up
And done.
Now you can open the swagger to access the APIs: Swagger
You can access the: Elasticsearch
Even you can try your hands on: Kibana
Thank You :)