Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/met-dev/spring-boot-elasticsearch-crud
Basic CRUD api with Java, Spring Boot, Elasticsearch
https://github.com/met-dev/spring-boot-elasticsearch-crud
crud-api elasticsearch java spring spring-boot
Last synced: about 1 month ago
JSON representation
Basic CRUD api with Java, Spring Boot, Elasticsearch
- Host: GitHub
- URL: https://github.com/met-dev/spring-boot-elasticsearch-crud
- Owner: MET-DEV
- License: mit
- Created: 2022-09-17T14:38:22.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-26T14:52:23.000Z (almost 2 years ago)
- Last Synced: 2024-11-09T09:39:59.444Z (3 months ago)
- Topics: crud-api, elasticsearch, java, spring, spring-boot
- Language: Java
- Homepage:
- Size: 62.5 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Note!
- Download: ` git clone https://github.com/MET-DEV/Spring-Boot-Elasticsearch-CRUD.git `
- I used Elasticsearch ` 7.4.2 `, in other versions you can get error.
- Docker command for up your image: ` docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:{your_tag} `
- If you want basic auth, you can remove ` -e "xpack.security.enabled=false" ` from command.
## Endpoints
For Get All Products ```GET localhost:8080/ ```
For Add Product ```POST localhost:8080/ ```
Example Request Body:
```json
{
"id":3,
"name":"Fırça",
"description":"Kötü bir fırça",
"price":33.5,
"categoryName":"ev"
}
```
For Update Product ```PUT localhost:8080/update ```
Example Request Body:
```json
{
"id":3,
"name":"Fırça",
"description":"Kötü bir fırça",
"price":33.5,
"categoryName":"ev"
}
```
For Delete Product ```DELETE localhost:8080/{id} ```