- Spring 5.0 Projects
- Nilang Patel
- 441字
- 2021-07-02 12:35:08
Spring WebFlux application
We will create a sample web application with the WebFlux framework. The application will simply access existing student information from a data store. Instead of making a fully fledged application, we will focus more on how to access data in a reactive manner with the WebFlux framework.
We will use Spring Boot to kickstart the development. For those who are new to Spring Boot, it is a tool and part of Spring Horizon, which is designed to speed up and simplify the bootstrapping and development of new Spring-based applications.
You might have come across bulky XML and other configurations repeatedly in Spring projects. The Spring team was well aware of this and has finally developed a tool called Spring Boot, aimed at freeing the developer from providing a boilerplate configuration, which is not only tedious but time consuming.
We will create a sample web application using MongoDB as a data store. While working with Reactive Programming, it is recommended to use non-blocking and reactive capable datastores, like MongoDB, Couchbase, Cassandra, and so on. We will use a tool called Spring Tool Suite (STS), which is an Eclipse-based IDE. It provides support for creating Spring Boot-based applications. Download it from: https://spring.io/tools3/sts/all and install it in your local machine.
Once downloaded, open it, select the File | New | Spring Starter Project menu and fill the form as follows:

Click on the Next button, and you will be asked to define the dependencies. Choose the following dependencies. You can use the textbox, Available to search for a particular dependency:
- Web: Used to add Spring MVC specific dependencies.
- Reactive Web: To add WebFlux specific dependencies.
- DevTools: Helpful for development as it will auto-refresh the changes in the embedded container to see the changes quickly.
- Reactive MongoDB: Spring Data dependency for MongoDB that works in a reactive paradigm. Make sure you don't select MongoDB, which is a dependency to work with MongoDB in the non-reactive model.
Click on Finish, and you will see a project is created in the Package Explorer (or Project Explorer) section of STS. Once the project is created, we will perform the following steps.
- 網(wǎng)絡(luò)協(xié)議工程
- 自動駕駛網(wǎng)絡(luò):自智時代的網(wǎng)絡(luò)架構(gòu)
- 網(wǎng)絡(luò)故障現(xiàn)場處理實(shí)踐(第4版)
- Force.com Development Blueprints
- React:Cross-Platform Application Development with React Native
- Spring 5.0 Projects
- 2小時讀懂物聯(lián)網(wǎng)
- 網(wǎng)管第一課:網(wǎng)絡(luò)操作系統(tǒng)與配置管理
- 物聯(lián)網(wǎng)場景設(shè)計與開發(fā)(初級)
- Getting Started with nopCommerce
- 高級網(wǎng)絡(luò)技術(shù)
- 網(wǎng)絡(luò)工程實(shí)施技術(shù)與方案大全
- 轉(zhuǎn)化:提升網(wǎng)站流量和轉(zhuǎn)化率的技巧
- 無線傳感器網(wǎng)絡(luò)定位技術(shù)
- 局域網(wǎng)組成實(shí)踐