Spring Cloud

An Important Property of Modern Web Apps is Resilience. In simple words, resilience is the ability of a system’s feature to fail gracefully without impacting the entire system. In the case of web apps, we want to make sure that the entire system will not be down if a remote service (a database, API Server)…

Read More Enforcing Resilience in a Spring Boot App using Resilience4J

In this tutorial on Spring Cloud you will learn how to create your own Spring Cloud Config Server and also, how to configure a Spring Boot Application to be a Spring Cloud Config Client. Spring Cloud Config Server Spring Cloud Config Server is a Spring Boot application. So to create our own Spring Cloud Config…

Read More Spring Cloud Config Server and Config Client

In this tutorial, you will learn how to create a very simple Spring Cloud API Gateway Global Pre-filter and Post filter classes. Global filters are executed for every route defined in the API Gateway. The main difference between pre-filter and post-filter class is that the pre-filter code is executed before Spring Cloud API Gateway routes the request…

Read More Spring Cloud API Gateway Global Filter Example

One of the ways to make sure that an HTTP request to a web service endpoint contains an Authorization JWT token is to configure a gateway route to require an Authorization header.  This way, if the HTTP request does not contain an Authorization header, Spring Cloud API Gateway will not even route this request to…

Read More The Header Predicate in Spring Cloud API Gateway

In this tutorial, you will learn how to configure your Spring Cloud API Gateway to automatically create routes based on services registered with Discovery clients like Eureka, Consul, or Zookeeper. For a step by step series of video lessons, please check this page: Spring Boot Microservices and Spring Cloud. Enable Discovery Locator A very quick way…

Read More Spring Cloud API Gateway Automatic Mapping of Routes

In this tutorial, you will learn how to start your Spring Boot application on a random port number. This is very helpful when you need to start multiple instances of the same Spring Boot application and then balance HTTP requests between the running instances. If you are interested to learn how to balance HTTP requests…

Read More Start Spring Boot App on a Random Port Number

In this tutorial, you will learn how to create an instance of @LoadBalanced RestTemplate and make it communicate with an internal microservice. For a step by step series of video lessons, please check this page: Spring Boot Microservices and Spring Cloud. Create RestTemplate Bean To create an instance of RestTemplate, you will need to first…

Read More @LoadBalanced RestTemplate Call Internal Microservice

In this tutorial, you will learn how to make Zuul API Gateway pass an Authorization header to a downstream Microservice. To learn how to make Spring Boot Microservice read HTTP Request headers, please read this tutorial: Read HTTP Request Header in Spring MVC. Configure Zuul API Gateway to Forward an Authorization Header By default, Zuul…

Read More Pass Authorization Header to Downstream Microservice

In this short tutorial, you will learn to create a Docker image for your Spring Cloud Config Server which uses Symmetric or Asymmetric encryption to protect sensitive information. To learn how to create Spring Cloud Config that uses Symmetric encryption, read Spring Cloud Config – Symmetric Encryption and Decryption(Includes Video tutorial). And to learn how to create…

Read More Docker Image for Spring Cloud Config Server

In this tutorial, I am going to share with you how to secure Spring Cloud Eureka dashboard with Spring Security. To learn how to build RESTful Microservices with Spring Cloud by watching step-by-step video lessons, please check this page: Spring Boot Microservices and Spring Cloud. Add Spring Security to Eureka To secure Eureka with Spring Security…

Read More Secure Eureka Dashboard with Spring Security

If a requested Microservice takes long time to respond, Zuul Api Gateway might timeout and a Gateway timeout error will take place. { “timestamp”: “2019-05-24T00:53:22.152+0000”, “status”: 504, “error”: “Gateway Timeout”, “message”: “com.netflix.zuul.exception.ZuulException: Hystrix Readed time out” } In this short blog post I am going to share with you how to make your Zuul Api…

Read More Zuul API Gateway Timeout Error

In this tutorial you will learn how to handle errors when using Hystrix Circuit breaker together with Feign client. To handle errors we will use Feign Hystrix FallbackFactory. For step-by-step video beginner lessons that demonstrate how to do Feign error handling and also how to build Microservices with Spring Boot and Spring Cloud, have a…

Read More Hystrix Circuit Breaker and Feign Error Handling

In this tutorial I am going to share with you how you can use Feign ErrorDecoder to handle errors that take place when using Feign client in Microservices communication. For step-by-step video beginner lessons that demonstrate how to do Feign error handling and also how to build Microservices with Spring Boot and Spring Cloud, have a…

Read More Feign Error Handling with ErrorDecoder

In this tutorial you will learn how to use Netflix Hystrix circuit breakers to enable your Microservices to gracefully handle situations when one of the Microservices becomes unavailable to handle a request during the inter-service communication. For step-by-step beginner video lessons that demonstrate how to use Hystrix Circuit Breaker and also how to build Microservices…

Read More Hystrix CircuitBreaker and Feign

Free Video Lessons

Enter your email and stay on top of things,

Subscribe!