SystemProperty.java
597 Bytes
package com.glsx.config;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
/**
* @Title: 钻石配置工具类
* @Description:
* @author fengzhi
*/
@Configuration
public class SystemProperty implements EnvironmentAware {
private static Environment environment;
@Override
public void setEnvironment(Environment environment) {
this.environment = environment;
}
public static String getProperty(String propertyName) {
return environment.getProperty(propertyName);
}
}