package com.kingdee.eas.cp.trd.webservice.taskinter;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class TaskInteConfigUtil {
public static String hostAdress;
public static int port;
public static int clientTimeout;
public static String appId;
static{
Properties props = new Properties();
ClassLoader classLoader = TaskInteConfigUtil.class.getClassLoader();
InputStream in = null;
try {
in = classLoader.getResourceAsStream("com/kingdee/eas/cp/trd/webservice/taskinter/TastInterConfig.properties");
props.load(in);
hostAdress = props.getProperty("hostAdress");
port = Integer.valueOf(props.getProperty("port"));
clientTimeout = Integer.valueOf(props.getProperty("clientTimeout"));
appId = props.getProperty("appId");
} catch (Exception e) {
e.printStackTrace();
}finally{
if(in != null){
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}
读取工程下指定路径文件
最新推荐文章于 2023-02-16 16:02:47 发布