leutu
2024-05-20 a4e99a6a39284643fdf2b04dbe55212e5954973c
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;
    }
}