leutu
2024-08-20 bbd50cf91c9a8c7cfe48b3c00dde205b7049ae3b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.skyline.electricity.utils;
 
import org.springframework.core.env.*;
 
public class PropertiesUtil
{
    private static Environment env;
    
    public static void setEnvironment(final Environment env) {
        PropertiesUtil.env = env;
    }
    
    public static String getProperty(final String key) {
        return PropertiesUtil.env.getProperty(key);
    }
    
    static {
        PropertiesUtil.env = null;
    }
}