SystemProperty.java
751 Bytes
package com.glsx.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
/**
* @Title: SystemProperty.java
* @Description:
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@Configuration
public class SystemProperty implements EnvironmentAware {
private static Environment environment;
@Override
public void setEnvironment(Environment environment) {
this.environment = environment;
}
public String getProperty(String propertyName) {
return environment.getProperty(propertyName);
}
}