In this tutorial you will learn how to configure your Spring Cloud Config Server to use native file system as a backend. Create Spring Cloud Config Server To learn how to create your very first Spring Cloud Config Server please ready this tutorial: Spring Cloud Config Server and Config Client. Native File System as Backend To…

Read More Spring Cloud Config Server – File System as a Backend

In this tutorial you will learn how to use Declarative REST Client Feign to make HTTP Requests RESTful Web Services. You can use Feign client to make HTTP Requests to a registered with Eureka Discovery Service Microservice or to an external RESTful Web Service. Creating New Spring Boot Project To demonstrate how Feign client works…

Read More Spring Feign Client HTTP Request Example

In this Java tutorial I am going to share with you a different ways of how to generate a random String of characters. You will learn to generate the following types of random Strings of characters: alpha-numeric String of characters of any length or of a specific length, Letters only, Numbers only. I hope you…

Read More Generate Random String in Java. Different ways.

In this Spring Boot tutorial you will learn how to implement User Authentication(User Login) functionality for your RESTful Web Service built with Spring Boot, Spring MVC, Spring Security using JWT. There is also a step-by-step video demonstration on how to do User Authentication available here. The user authentication functionality we are going to implement in…

Read More User Authentication – Spring Boot, Spring Security, JWT

In this short tutorial you will learn how to use SearchPaths to configure your Spring Cloud Config Server to discover properties files in a remote Git repository subdirectories. To learn how to configure Spring Cloud Config Server and also Spring Cloud Config Client please read this tutorial: Learn to use Spring Cloud Config Server and Spring…

Read More Spring Cloud Config Server – SearchPaths

In this tutorial you will learn how to bind nested properties from application.properties file to a Java class. Once you finish this tutorial you might also want to check: How to bind simple(not nested) properties to a Java class, and How to use @ConfigurationProperties with Spring Boot @Profile. Example of Nested Properties in a Properties File…

Read More Spring Boot Nested Properties with @ConfigurationProperties

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