You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This microservice is built using **Spring Boot** and **Spring WebFlux** to provide an asynchronous, non-blocking REST API. It interacts with a **MongoDB NoSQL database** to store and retrieve product information.
5
+
6
+
## Features
7
+
- Retrieve products by **EAN code**.
8
+
- Retrieve a product by **EAN code and Store ID**.
9
+
- Uses **Spring Data Reactive MongoDB** for database interactions.
10
+
- Asynchronous handling with **Spring WebFlux**.
11
+
- Includes **unit tests** with JUnit 5 and Mockito.
12
+
13
+
## Technologies Used
14
+
- Java 17
15
+
- Spring Boot 3
16
+
- Spring WebFlux
17
+
- Spring Data MongoDB (Reactive)
18
+
- MongoDB
19
+
- JUnit 5 & Mockito (for testing)
20
+
- Maven
21
+
22
+
## API Endpoints
23
+
24
+
### 1. Get all products with a specific EAN
25
+
**Request:**
26
+
```sh
27
+
GET /products/ean/{ean}
28
+
```
29
+
**Example:**
30
+
```sh
31
+
curl -X GET "http://localhost:8080/products/ean/123456789" -H "Content-Type: application/json"
32
+
```
33
+
### 2. Get a product by EAN and Store ID
34
+
**Request:**
35
+
```sh
36
+
GET /products/ean/{ean}/store/{storeId}
37
+
```
38
+
**Example:**
39
+
```sh
40
+
curl -X GET "http://localhost:8080/products/ean/123456789/store/1" -H "Content-Type: application/json"
0 commit comments