An API Gateway is responsible for exposing an API, making multiple service calls, aggregating the results, and returning them to the client. The Finagle Scala framework makes this natural by representing service calls as futures, which can be composed to represent dependencies. To stay consistent with other examples in this book, we'll build a small example gateway service in Java using the Spring Boot framework:
- Create the project skeleton. Create a new Java project and add the following dependencies and plugins to the Gradle build file. We'll be using Spring Boot and Hystrix in this recipe:
plugins { id 'org.springframework.boot' version '1.5.9.RELEASE'}group 'com.packtpub.microservices'version '1.0-SNAPSHOT'apply plugin: ...