The first step of any project is bootstrapping the application. Find out how to bootstrap a Spring Boot 2 project with Spring 5 using the Spring Initializr tool.
- Let's get started building our Spring 5 reactive web application. So how do we get started? We could use the Spring Initializr utility to generate a base Spring Boot 2 Java application. This will generate our base project skeleton. There are four options for using Spring Initializr. First of all, we have the web interface at start.spring.io. Using this option you can configure your application visually. Your second option is the Spring CLI. You can install the Spring CLI using Homebrew. You could use the commands brew, tab, pivotal/tap. Then brew, install, springboot. Then you can invoke the spring init command to create a project. Your third option is an IDE plugin. Some IDEs like Intellij Ultimate have a plugin built in. Or you could use a plugin referenced by the Spring Initializr GitHub page. Finally, you could call the API directly using a kernel statement. Here's an example of calling the API to generate a project directly. In this video we're going to use the Spring Initializr web app. Let's navigate back to start.spring.io. Let's select a Gradle Project, select Java as the language, select the latest stable release of Spring Boot 2, then let's set the package name to com.linkedinlearning. Now let's set the artifact name to reactivespring. Go ahead and click on more options, then scroll down and select Java 12. In the search bar type in reactive web. Okay, let's click add. Now type in Reactive Mongo DB. Let's add the Reactive Mongo DB dependency, and finally type in Embedded Mongo DB. An embedded mongo DB instance will help us run unit tests and help us run locally. In production you definitely don't want to use a embedded database, however. Let's verify all our settings, then select generate project. Awesome, that's it. We've generated our base project. Moving forward, next steps will be to extract the zip file and import the project into Intellij.
- Benefits of using reactive programming with Angular and Spring
- Bootstrapping your Spring Boot app
- Building a reactive Spring REST API
- Creating and testing a WebFlux GET endpoint
- Building a front-end app with Angular
- Using and configuring reactive Spring Data
- Using a REST API GET request
- Unit testing with Spring Boot and Angular