- 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.
- RCNP實(shí)驗(yàn)指南:構(gòu)建高級(jí)的路由互聯(lián)網(wǎng)絡(luò)(BARI)
- 高校網(wǎng)絡(luò)道德教育研究
- 物聯(lián)網(wǎng)安全(原書第2版)
- C++黑客編程揭秘與防范
- Web Application Development with R Using Shiny
- 網(wǎng)絡(luò)安全技術(shù)與解決方案(修訂版)
- 2018網(wǎng)信發(fā)展報(bào)告
- Building RESTful Web services with Go
- 網(wǎng)管第一課:網(wǎng)絡(luò)操作系統(tǒng)與配置管理
- 大型企業(yè)微服務(wù)架構(gòu)實(shí)踐與運(yùn)營
- 物聯(lián)網(wǎng)技術(shù)與實(shí)踐
- 新IP:面向泛在全場(chǎng)景的未來數(shù)據(jù)網(wǎng)絡(luò)
- SD-WAN 架構(gòu)與技術(shù)
- 學(xué)術(shù)虛擬社區(qū)用戶社會(huì)化交互行為研究
- Mastering Prezi for Business Presentations