Book Image

Mastering Spring Cloud

By : Piotr Mińkowski
Book Image

Mastering Spring Cloud

By: Piotr Mińkowski

Overview of this book

Developing, deploying, and operating cloud applications should be as easy as local applications. This should be the governing principle behind any cloud platform, library, or tool. Spring Cloud–an open-source library–makes it easy to develop JVM applications for the cloud. In this book, you will be introduced to Spring Cloud and will master its features from the application developer's point of view. This book begins by introducing you to microservices for Spring and the available feature set in Spring Cloud. You will learn to configure the Spring Cloud server and run the Eureka server to enable service registration and discovery. Then you will learn about techniques related to load balancing and circuit breaking and utilize all features of the Feign client. The book now delves into advanced topics where you will learn to implement distributed tracing solutions for Spring Cloud and build message-driven microservice architectures. Before running an application on Docker container s, you will master testing and securing techniques with Spring Cloud.
Table of Contents (22 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Index

Integrating application with database


You can find more interesting features described in the Spring Boot specification. I would like to spend more time describing other cool functionalities provided by that framework, but we should not go too far away from the main topic—Spring for microservices. As you may recall, through including embedded MongoDB in the project, I promised you a more advanced microservice example. Before starting to work on it, let's go back for a moment to the current version of our application. Its source code is available on my public GitHub account. Clone the following Git repository to your local machine: https://github.com/piomin/sample-spring-boot-web.git.

Building a sample application

The basic example is available in the master branch. The more advanced sample, with embedded MongoDB, is committed to the mongobranch. In case you would like to try running more advanced sample, you need to switch to that branch usinggit checkout mongo. Now, we need to perform some...