leutu
2024-05-08 543e4eb01ca210b20876e8139cb3d0403d7d065c
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;
    }
}