Author: Sergey Kargopolov

In this tutorial you will learn how to use @ConfigurationProperties together with Spring Boot Profiles and @Profile annotation. This tutorial assumes you have a basic knowledge of how to use @ConfigurationProperties in your Spring Boot application. If you are very new to it, then please read this tutorial: Spring Boot @ConfigurationProperties Tutorial. You should also have…

Read More Using Spring Boot @ConfigurationProperties and @Profile

@ConfigurationProperties is used to bind all the properties in a properties file to a Java class annotated with @ConfigurationProperties. You can then use a Java object to access configuration properties defined in a properties file. Earlier I have shared with you a tutorial on how to read application properties in Spring Boot RESTful Web Service…

Read More Spring Boot @ConfigurationProperties Tutorial

In this tutorial you will learn how to use Spring Boot Profiles. You can use Spring Boot Profile functionality when you need to provide application configuration for a specific environment. For example, when your application runs in a development environment, then your application will use a specific for that environment application.properties file. And when you…

Read More Spring Boot Profiles Tutorial

In this short Java tutorial I am going to share with you a few different ways you can use to iterate over a collection in Java. Iterating List with Enhanced For-Loop List<String> names = new ArrayList<>(); names.add(“Sergey”); names.add(“Bill”); names.add(“John”); for(String name: names) { System.out.println(name); } Iterating List with forEach() and Lambda List<String> names = new…

Read More Ways to Iterate Over a Collection in Java

In this tutorial you will learn how to use Spring Cloud Bus to notify running Microservices about the changes in Spring Cloud Config property file. Running Microservices will be updated with new properties stored in Spring Cloud Config file without the need for you to restart them. These way you can update values in a…

Read More Spring Cloud Bus – Refreshing Config Changes

In this tutorial you will learn how to download, install and run Rabbit MQ on your computer. I am also going to show you how to change default Rabbit MQ Administrator password and how to create a new user. Download, Install and Run Rabbit MQ To download Rabbit MQ for your computer, visit the following…

Read More Rabbit MQ – Download, Install and Change Password

In this short Spring Boot tutorial I am going to show you how use @Validated and @Email annotations to validate email address sent to a RESTful Web Service in HTTP GET Request. If you are looking for an example of how to validate email address sent in HTTP POST request, please have a look at my…

Read More Spring Boot – Validate Email in @RequestParam

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 use Zuul API Gateway to enable the load balancing of your RESTful Web Services registered with Eureka Discovery Service. Because Zuul API Gateway internally uses Ribbon Load Balancer there is almost nothing you need to do to have this load balancer work for you. To be able…

Read More Zuul and Eureka – Load Balancing Example