概要
Spring WebFluxとは何ですか?これは、逆圧力メカニズムをサポートする非同期の非ブロッキングのWeb開発フレームワークです。 Spring WebFluxに関する洞察を得るには、まず反応的なストリームを知る必要があります。命令的なプログラミングとは反対の別のプログラミング姿勢。
WebFluxは2つのプログラミングスタイル(ポーズ)とパターン(ポテンシャル)をサポートしています
注:上記は2つのプログラミング姿勢であり、「マンダリンとチョングの方言はどちらも中国語です」と同じです。私たちの会社は他の場所の人々もいます。私は地元の同僚とマンダリンと唐辛子の方言を話します。これは多型と呼ばれます
プロジェクトを作成します
http://start.spring.ioを介してプロジェクトスケルトンを作成します。
手動で構成されている場合は、SpringのMilestoneリポジトリを追加する必要があります。
<Repository> <Repository> <id> spring-snapshots </id> <name> spring snapshots </name> <url> https://repo.spring.io/snapshot </url> <snapshots> <enabled> true </enabled> </snapshots>マイルストーン</name> <url> https://repo.spring.io/milestone </url> <SnapShots> <Enabled> false </enabled> </snapshots> </repository> </repository> </repository> <pluginRepository> sprupsository> <id> <id> <id> <id> sprupsnapshots <スナップショット</name> <url> https://repo.spring.io/snapshot </url> <SnapShots> <Enabled> true </enabled> </snapshots> </pluginRepository> <pluginrepository> <id> spring-milestones </id> spring milestone </name </name> <url> https://repo.spring.io/milestone </url> <SnapShots> <Enabled> false </enabled> </snapshots> </pluginrepository> </plaginrepositories>
テスト
すべてのユーザーをリストします
ユーザーを作成します
単一のユーザーを取得します
改訂
消去
ソースコード
デモ-Spring-Boot-Webflux-Annotaion
要約します
上記は、編集者がSpring Boot 2.0 + WebFluxを使用してRESTFUL API関数を実装するために紹介したものです。私はそれが誰にでも役立つことを願っています。ご質問がある場合は、メッセージを残してください。編集者は、すべての人に時間内に返信します。 wulin.comのウェブサイトへのご支援ありがとうございます!