leutu
2024-08-20 6c914caa1e16d709d16c39b6ae55bd8b5c8f0283
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;
    }
}