Read properties file in Spring using util namespace

In this tutorial, I will show you how to read properties files in Spring using the util namespace. First, I will create a Maven project as an example: The contents of the Application class are as follows:

I will use Java 17 for this… Read More

Read properties files in Spring using context namespace

In this tutorial, I will show you how to read file properties in Spring using the context namespace. But first, let’s create an example project. I will use Java 17 for this example:

Spring framework dependency:

Class Application:

In our example, the… Read More

BeanFactory and ApplicationContext in Spring

In my tutorials about the Spring framework, I often use the object of the ApplicationContext interface as a Spring container to call the object that I need to retrieve. For example, in the previous tutorial:

But in fact, Spring also provides us with another… Read More

JPA and Spring framework

In JPA, the EntityManagerFactory object is an entity management object that manages the connection to the database. Using Spring to manage this object will help us a lot in developing Java applications that use JPA. In this tutorial, I will guide you on how to… Read More

Using properties in Spring with @Value annotation

In this tutorial, I would like to introduce to you all how to use properties in Spring with @Value annotation. First of all, we need a Maven project for example: I will use Java 17 for this example:

Spring framework dependency:

HelloWorld class:… Read More