gradle构建SpringWebflux+R2DBC+MySQL的RestfulAPI(增删改查)
docker run -d -p 3367:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:5.7
exec init.sql
./gradlew build
生成在项目 build/libs/demo-1.0.1.jar
docker build . -t demo
docker run --name demo --rm -p 5002:5002 demo
curl --header "Content-Type: application/json" \
--request POST \
--data '{"title":"title","author":"dave","content": "china news"}' \
http://127.0.0.1:5002/articles
curl http://127.0.0.1:5002/articles
curl http://127.0.0.1:5002/articles/3
curl --header "Content-Type: application/json" \
--request PUT \
--data '{"title":"new title","author":"new author","content": "china news"}' \
http://127.0.0.1:5002/articles/3
curl -X DELETE --header "Content-Type: application/json" \
http://127.0.0.1:5002/articles/2