📄 adcoption.java
字号:
package mcm.adc;
import java.util.Properties;
import mcm.util.Resources;
public class ADCOption {
private static ADCOption option = new ADCOption();
public static ADCOption getInstance(){
return option;
}
private Properties prop;
/** ADC服务的URL */
private String ADCSrvUrl = null;
/** SI服务CODE */
private String SICode = null;
/** SI服务提供的URL */
private String SIActUrl = null;
/**
* 构造函数,初始化设定
*
*/
private ADCOption(){
try{
prop = new Properties();
prop.load(Resources.getResourceAsStream("properties/adc.properties"));
ADCSrvUrl = prop.getProperty("ADCServiceURL");
SICode = prop.getProperty("SICode");
SIActUrl = prop.getProperty("SIActionURL");
}
catch(Exception ex){
ex.printStackTrace(System.err);
}
}
/**
* @return the aDCSrvUrl
*/
public String getADCSrvUrl() {
return ADCSrvUrl;
}
/**
* @return the sIActUrl
*/
public String getSIActUrl() {
return SIActUrl;
}
/**
* @return the sICode
*/
public String getSICode() {
return SICode;
}
/**
*
* @param code
* @return
*/
public String getResultMess(String code){
String mess = prop.getProperty("RESULT_MESS_" + code);
if(mess == null){
return code;
}
return mess;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -