mirror of https://github.com/elunez/eladmin
运维部署,解决每次连接不同服务器都默认访问第一台服务器的问题
parent
651253f640
commit
8def7ea9a0
|
@ -29,13 +29,8 @@ import java.util.logging.Logger;
|
|||
*/
|
||||
public class ScpClientUtil {
|
||||
|
||||
static private ScpClientUtil instance;
|
||||
|
||||
static synchronized public ScpClientUtil getInstance(String ip, int port, String username, String password) {
|
||||
if (instance == null) {
|
||||
instance = new ScpClientUtil(ip, port, username, password);
|
||||
}
|
||||
return instance;
|
||||
return new ScpClientUtil(ip, port, username, password);
|
||||
}
|
||||
|
||||
public ScpClientUtil(String ip, int port, String username, String password) {
|
||||
|
|
Loading…
Reference in New Issue