Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/davidarchanjo/spring-webflux-r2dbc

Sample Spring Boot project implementing some R2DBC features with Spring WebFlux
https://github.com/davidarchanjo/spring-webflux-r2dbc

java r2dbc spring-boot spring-webflux

Last synced: 6 days ago
JSON representation

Sample Spring Boot project implementing some R2DBC features with Spring WebFlux

Awesome Lists containing this project

README

        

# Spring Boot WebFlux R2DBC Application
![banner](./assets/banner.jpg)

# Booting Up


  1. Launch Postgres from Docker:

  2. docker run --rm -p 5432:5432 -e POSTGRES_PASSWORD=admin postgres:13.1-alpine -d postgres
  3. Clone the repository:

  4. git clone https://github.com/davidarchanjo/spring-webflux-r2dbc
  5. Navigate to the folder:

  6. cd spring-webflux-r2dbc
  7. Install dependencies and build the application:

  8. mvn clean install
  9. Run the application:

  10. java -jar target/spring-webflux-r2dbc-1.0.0.jar

# Testing
- Create New Author
`POST /authors`
```json
{
"name": "David A. Pereira"
}
```

- Create New Book
`POST /books`
```json
{
"idAuthor": "1efcf599-116f-1fb6-cf3c-13d7528b7fb7",
"title": "Harry Potter: Hogwarts Mystery",
"dateOfParution": "2021-11-28"
}
```

# Reference
Inspired by this [project](https://www.sipios.com/blog-tech/handle-the-new-r2dbc-specification-in-java).