Here I am going to build an application to show how to use Spring Cloud Bus. Let’s say you have multiple applications reading properties using Spring Cloud Config from centralized configuration files (for example, from Git repository). Spring Cloud Config is where you can have not only your all configurations centrally managed but also you…

Posted in Kafka Spring Boot Spring Cloud

Spring Cloud Bus Example

Introduction This tutorial walks you through the process of consuming the configurations from the Spring cloud config server. So I will setup a config server and build a client application consumes the configuration on startup and then refreshes the configuration without restarting the client. Let’s say you have some configuration values, in application properties or…

Posted in Spring Boot Spring Cloud

Spring Centralized Runtime Properties Configuration without refreshing the Client

Sometimes we may need to have some conditional statement in Spring config XML file depending upon some variables value. Think of a situation when you are using JPA in your application and your application may have two persistence units in Spring XML config file and you need to connect to one of them depending upon…

Posted in Spring Core

Conditional Statement in Spring Config

With this example I will show you how compound or nested property names work in Spring application. Compound or nested property names are perfectly legal when setting bean properties, as long as all components of the path except the final property name are non-null. You can use compound or nested property names when you set…

Posted in Java Spring Core

Compound Property Names in Spring

With this example I will show you how to inject Collections type Props in Spring applications. This is similar to the element type Map I had shown in another example. I am going to use Spring Boot framework but I will show you both using application.properties file as well as traditional XML config file to…

Posted in Java Spring Core

Working with Collection Element Props in Spring Application

This tutorial will show you how we can call stored procedure using Spring StoredProcedure. I assume you have a basic idea on stored procedure what it does and what are the advantages of using stored procedure. I am going to build the project using both maven and gradle build tools. Related Posts: Call Stored Procedure…

Posted in MySQL Spring JDBC

Call Stored Procedure using Spring StoredProcedure

This tutorial will show you how you can call or execute stored procedure using Spring SimpleJdbcCall. SimpleJdbcCall API provides flexible methods to invoke stored procedure. You can use DataSource directly with SimpleJdbcCall or you can create JdbcTemplate using DataSource and use JdbcTemplate with SimpleJdbcCall API for calling the stored procedures. You can also use RowMapper…

Posted in MySQL Spring JDBC

Call Stored Procedure using Spring SimpleJdbcCall

This tutorial will show you how we can auto inject value from properties file in Spring. For this tutorial we will create a standalone maven project in Eclipse. If you already have an idea on how to create a maven project in Eclipse will be great otherwise I will tell you here how to create…

Posted in Java Spring Core

Injecting properties value in Spring