Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/callicoder/spring-webflux-reactive-rest-api-demo
Build Reactive Rest APIs with Spring WebFlux and Reactive Mongo
https://github.com/callicoder/spring-webflux-reactive-rest-api-demo
reactive-microservices reactive-programming reactive-streams reactivemongo reactor rest-api spring-boot spring-reactive spring-webflux spring5
Last synced: 5 days ago
JSON representation
Build Reactive Rest APIs with Spring WebFlux and Reactive Mongo
- Host: GitHub
- URL: https://github.com/callicoder/spring-webflux-reactive-rest-api-demo
- Owner: callicoder
- Created: 2017-09-12T11:01:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-10-13T11:05:23.000Z (over 3 years ago)
- Last Synced: 2025-01-09T12:19:00.717Z (13 days ago)
- Topics: reactive-microservices, reactive-programming, reactive-streams, reactivemongo, reactor, rest-api, spring-boot, spring-reactive, spring-webflux, spring5
- Language: Java
- Homepage: https://www.callicoder.com/reactive-rest-apis-spring-webflux-reactive-mongo/
- Size: 61.5 KB
- Stars: 159
- Watchers: 8
- Forks: 135
- Open Issues: 3
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Build Reactive Rest APIs with Spring WebFlux and Reactive MongoDB
Read the tutorial : https://www.callicoder.com/reactive-rest-apis-spring-webflux-reactive-mongo/
## Requirements
1. Java - 11
2. Maven - 3.x.x
3. MongoDB - 3.x.x
## Steps to Setup
**1. Clone the application**
```bash
git clone https://github.com/callicoder/spring-webflux-reactive-rest-api-demo.git
```**2. Build and run the app using maven**
```bash
cd spring-webflux-reactive-rest-api-demo
mvn package
java -jar target/webflux-demo-0.0.1-SNAPSHOT.jar
```Alternatively, you can run the app without packaging it using -
```bash
mvn spring-boot:run
```The server will start at .
## Exploring the Rest APIs
The application defines following REST APIs
```
1. GET /tweets - Get All Tweets2. POST /tweets - Create a new Tweet
3. GET /tweets/{id} - Retrieve a Tweet by Id
3. PUT /tweets/{id} - Update a Tweet
4. DELETE /tweets/{id} - Delete a Tweet
4. GET /stream/tweets - Stream tweets to a browser as Server-Sent Events
```## Running integration tests
The project also contains integration tests for all the Rest APIs. For running the integration tests, go to the root directory of the project and type `mvn test` in your terminal.