Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/g-khan/spring-webflux-reactive-rest-api-demo
Sample Reactive Rest Service with Spring WebFlux
https://github.com/g-khan/spring-webflux-reactive-rest-api-demo
Last synced: 8 days ago
JSON representation
Sample Reactive Rest Service with Spring WebFlux
- Host: GitHub
- URL: https://github.com/g-khan/spring-webflux-reactive-rest-api-demo
- Owner: G-khan
- Created: 2022-01-09T10:36:09.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-27T17:32:01.000Z (over 1 year ago)
- Last Synced: 2023-07-19T17:34:39.477Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 150 KB
- Stars: 16
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spring-webflux-reactive-rest-api-demo
Building Reactive app with Spring Webflux.
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)]**Examples**
* Reactive Endpoints
* Mono, Flux structures
* Functional Reactive Endpoints
* WebClient & WebTestClient
* R2DBC with PostgreSQL## Requirements
1. Java - 1.11.x
2. Gradle- 7.x.x
3. Docker- 20.x.x**Running the Database**
Type the following command in your terminal to run the database -docker-compose up
**Running the App**
Type the following command in your terminal to run the app -./gradlew bootRun
The app will start running at [http://localhost:8099](http://localhost:8099/).
**Running the Tests**
Type the following command in your terminal to run the tests -./gradlew test
---
## Requests
###
GET http://localhost:8099/api/v1/users
###
POST http://localhost:8099/api/v1/users
Content-Type: application/json
{
"name": "Betül",
"score": 52
}
###
PUT http://localhost:8099/api/v1/users/24
Content-Type: application/json
{
"name": "Gokhanadev",
"score": 52
}
###
DELETE http://localhost:8099/api/v1/users/24###
GET http://localhost:8099/api/v1/users/1
###
GET http://localhost:8099/api/v1/users/flux
###
GET http://localhost:8099/api/v1/users/guests/1