https://github.com/ismailraju/springwebfluxgradle
Spring web Flux Example with MongoDb Intregration gradle project
https://github.com/ismailraju/springwebfluxgradle
docker gradle mongodb reactive reactive-programming spring-web-flow springboot
Last synced: 2 months ago
JSON representation
Spring web Flux Example with MongoDb Intregration gradle project
- Host: GitHub
- URL: https://github.com/ismailraju/springwebfluxgradle
- Owner: ismailraju
- Created: 2022-04-29T17:22:32.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-29T17:44:27.000Z (about 4 years ago)
- Last Synced: 2025-10-24T08:42:45.688Z (8 months ago)
- Topics: docker, gradle, mongodb, reactive, reactive-programming, spring-web-flow, springboot
- Language: Java
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SpringWebFluxGradle
## Start MongoDb through Docker
```
cd SpringWebFluxGradle
docker-compose -f mongo-db-start.yml up
```
## Build Spring boot Gradle Project
```
cd SpringWebFluxGradle
gradlew build
```
## Run the Project
```
cd SpringWebFluxGradle
gradle bootRun
```
## Get DB data (Example)
```
GET http://localhost:8080/employees
```
##### Response
```
[{"id":"1","name":"Employee 1"},{"id":"2","name":"Employee 2"},{"id":"5","name":"Employee 5"},{"id":"6","name":"Employee 6"},{"id":"4","name":"Employee 4"},{"id":"3","name":"Employee 3"},{"id":"8","name":"Employee 8"},{"id":"7","name":"Employee 7"},{"id":"9","name":"Employee 9"},{"id":"10","name":"Employee 10"}]
```
## Consume another Api (using `WebClient`)
```
GET http://localhost:8080/consume
```
##### Response
```
[{"id":"1","name":"Employee 1"},{"id":"2","name":"Employee 2"},{"id":"5","name":"Employee 5"},{"id":"6","name":"Employee 6"},{"id":"4","name":"Employee 4"},{"id":"3","name":"Employee 3"},{"id":"8","name":"Employee 8"},{"id":"7","name":"Employee 7"},{"id":"9","name":"Employee 9"},{"id":"10","name":"Employee 10"}]
```