Spring Webflux example with MongoDB
Is a framework that became possible program in a reactive way
Always when you think about reactive remember: Async and non-blocking
You can create a new databe here and get the connection string to connect the application with your DB https://www.mongodb.com/atlas/database
MVC Events Stream to compare with Reactive Events Stream
curl --location --request GET 'localhost:8080/v1/playlist/events'
Reactive Events Stream
curl --location --request GET 'localhost:8080/v2/playlist/events'
Create new playlist
curl --location --request POST 'http://localhost:8080/v2/playlist' \
--header 'Content-Type: application/json' \
--data-raw '{
"nome":"Teste"
}'
Find all playlists
curl --location --request GET 'http://localhost:8080/v1/playlist'
Find playlist by Id
curl --location --request GET 'http://localhost:8080/v1/playlist/{id}'
mvn install
mvn pacakge
java -jar ./target/web-flux-0.0.1-SNAPSHOT.jar