package com.asiainfo.model; import java.io.Serializable; import java.util.Properties; import com.asiainfo.util.StringUtil; public class Param implements Serializable { private static final long serialVersionUID = 3341409342393688120L; private String cmdName = "perl"; private String path; private String fileName; private String host; private String port; private String dataBaseName; private String username; private String password; public Param(String cmdName, String fileName, String host, String port, String dataBaseName, String username, String password) { this.cmdName = cmdName; this.path = getCurrentPath(); this.fileName = fileName; this.host = host; this.port = port; this.dataBaseName = dataBaseName; this.username = username; this.password = password; } public String getCmdName() { return cmdName; } public void setCmdName(String cmdName) { this.cmdName = cmdName; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public String getHost() { return host; } public void setHost(String host) { this.host = host; } public String getPort() { return port; } public void setPort(String port) { this.port = port; } public String getDataBaseName() { return dataBaseName; } public void setDataBaseName(String dataBaseName) { this.dataBaseName = dataBaseName; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getCurrentPath() { // 取得根目录路径 String parentPath = getClass().getResource("../").getFile().toString(); Properties prop = System.getProperties(); String os = prop.getProperty("os.name"); if (StringUtil.isNotEmpty(os) && os.startsWith("Win")) { parentPath = parentPath.replace("/", "\\"); }else{ parentPath = "/" + parentPath; } return parentPath.substring(parentPath.indexOf("\\") + 1, parentPath.length()) + "perl\\"; } @Override public String toString() { return "Param [cmdName=" + cmdName + ", path=" + path + ", fileName=" + fileName + ", host=" + host + ", port=" + port + ", dataBaseName=" + dataBaseName + ", username=" + username + ", password=" + password + "]"; } }
最近下载更多
wangjinglin LV1
2019年12月9日
liuyishi LV6
2019年4月6日
blazing LV2
2019年2月19日
a1351328329 LV1
2018年6月25日
jic499 LV27
2018年4月13日
人工智能4708 LV11
2018年3月13日
sdxrh2005 LV1
2018年1月20日
shenkang10086 LV6
2017年5月11日
wyj11www LV1
2016年12月28日
WwZQ LV15
2016年4月8日