zj
2025-10-05 fc68aa452e2fd56441128d1d5a4b32f254c6191d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package kernel.util;
 
import java.io.IOException;
import java.util.Properties;
 
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
 
 
public class PropertiesLoaderUtils extends org.springframework.core.io.support.PropertiesLoaderUtils {
    
    public static void merge(Properties target, Properties source) {
        target.putAll(source);
    }
 
    public static Properties loadProperties(String path){
        Properties props = new Properties();
        Resource resource = new ClassPathResource(path);
        try {
            PropertiesLoaderUtils.fillProperties(props, resource);
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return props;
    }
}