package com.basic.security.manager.es;
|
|
import java.util.Properties;
|
|
public class ReadConfig {
|
//人员临时库的服务器ip
|
private static String TEMP_HOST;
|
|
//人员临时库的服务器端口
|
private static String TEMP_PORT;
|
|
//人员临时库的服务url
|
private static String TEMP_URL;
|
|
private static ReadConfig readConfig = new ReadConfig();
|
|
private ReadConfig() {
|
Properties properties = new Properties();
|
try {
|
properties.load(ReadConfig.class.getResourceAsStream("/assets/person_config.properties"));
|
} catch (Exception e) {
|
e.printStackTrace();
|
}
|
TEMP_HOST = properties.getProperty("TEMP_HOST");
|
TEMP_PORT = properties.getProperty("TEMP_PORT");
|
TEMP_URL = properties.getProperty("TEMP_URL");
|
}
|
|
public synchronized static ReadConfig getInstance() {
|
if (readConfig == null) {
|
readConfig = new ReadConfig();
|
}
|
return readConfig;
|
}
|
|
public String getTempHost() {
|
return TEMP_HOST;
|
}
|
|
public String getTempPort() {
|
return TEMP_PORT;
|
}
|
|
public String getTempUrl() {
|
return TEMP_URL;
|
}
|
|
}
|