Creating the Spring Cloud Gateway project

We will use the Spring Initializr to create our Spring Cloud Gateway project; we will need to add some dependencies manually. Let's go to the Spring Initializr page and create our project:

There is a brand new dependency Gateway, it enables us to work with Spring Cloud Gateway. Then click on Generate Project and wait for the download to complete.

After that, we need to add a missing dependency. The missing dependency is required by the Gateway to interact with the Eureka server; the name of the dependency is spring-cloud-starter-netflix-eureka-client. Then, let's add the dependency on our pom.xml

Get Spring 5.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.