private static final String RULESUBMITSERVLETURL;
private static final String
CALLSUBMITSERVLETURL;
static {
Properties props = new Properties();
String fileName = "sunshineserver.properties";
InputStream in = RuleDealJob.class.getClassLoader()
.getResourceAsStream(fileName);
if (in != null) {
try {
props.load(in);
RULESUBMITSERVLETURL = props.getProperty("sunshine.url")
+ props.getProperty("sunshine.ruleSubmit");
CALLSUBMITSERVLETURL = props.getProperty("sunshine.url")
+ props.getProperty("sunshine.callBackSubmit");
} catch (IOException e) {
throw new RuntimeException(
"读取接口工程地址文件失败,请确认classpath下存在intfserver.properties,"
+ e.getMessage(), e);
}finally{
if(in!=null){
try {
in.close();
} catch (IOException e) {
}
}
}
} else {
RULESUBMITSERVLETURL = "";
CALLSUBMITSERVLETURL = "";
}