yanghui
2022-12-02 1f203708b6018b57eaefc08951a476f9f6ea08f0
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);
    }
}