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:
|
1 2 3 4 5 6 7 8 9 10 11 |
package com.huongdanjava.spring; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class Application { public static void main(String[] args) { ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml"); } } |
I will use Java 17 for this… Read More





