lidongdong
2023-10-16 85f322e36c935d376c82aeaa7dc3a11ef121e4d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package com.springcloudme.servicezuul.util;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
 
@Component
public class Utils {
 
    @Autowired
    private Environment env;
 
    public String getProps(String key){
        return env.getProperty(key);
    }
}