【文件属性】:
文件名称:spring-webflux-reactive-rest-api-demo:使用Spring WebFlux和Reactive Mongo构建Reactive Rest API
文件大小:57KB
文件格式:ZIP
更新时间:2021-01-30 08:39:31
spring-boot rest-api reactive-streams reactive-programming reactor
使用Spring WebFlux和Reactive MongoDB构建Reactive Rest API
阅读教程: :
要求
Java-1.8.x
Maven-3.xx
MongoDB-3.xx
设定步骤
1.克隆应用程序
git clone https://github.com/callicoder/spring-webflux-reactive-rest-api-demo.git
2.使用maven生成并运行应用
cd spring-webflux-reactive-rest-api-demo
mvn package
java -jar target/webflux-demo-0.0.1-SNAPSHOT.jar
另外,您也可以使用-
mvn spring-boot:run
服务器将从。
探索Rest API
该应用程序定义以下REST API
1. GET /tweets - Get All Tweets
2. POST /tweets - Create a new Tweet
3. GET /tweets/{id} - Retrieve a Tweet
【文件预览】:
spring-webflux-reactive-rest-api-demo-master
----pom.xml(2KB)
----mvnw(6KB)
----Readme.md(1KB)
----src()
--------test()
--------main()
----.gitignore(249B)
----.mvn()
--------wrapper()
----mvnw.cmd(5KB)