feat(cli): 调整配置文件组成 方便根据集群配置文件覆盖通用配置方案
This commit is contained in:
@@ -7,20 +7,11 @@ package com.lanyuanxiaoyao.service.cli.core;
|
||||
* @date 2023-05-17
|
||||
*/
|
||||
public class HostInfo {
|
||||
private String host;
|
||||
private String ip;
|
||||
private Boolean useAuthority = false;
|
||||
private String username;
|
||||
private String password;
|
||||
|
||||
public String getHost() {
|
||||
return host;
|
||||
}
|
||||
|
||||
public void setHost(String host) {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
@@ -53,44 +44,13 @@ public class HostInfo {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public HostnameIp getHostnameIp() {
|
||||
return new HostnameIp(host, ip);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "HostInfo{" +
|
||||
"host='" + host + '\'' +
|
||||
", ip='" + ip + '\'' +
|
||||
", useAuthority=" + useAuthority +
|
||||
", username='" + username + '\'' +
|
||||
", password='" + password + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
public static class HostnameIp {
|
||||
private final String hostname;
|
||||
private final String ip;
|
||||
|
||||
private HostnameIp(String hostname, String ip) {
|
||||
this.hostname = hostname;
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public String getHostname() {
|
||||
return hostname;
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "HostnameIp{" +
|
||||
"hostname='" + hostname + '\'' +
|
||||
", ip='" + ip + '\'' +
|
||||
'}';
|
||||
}
|
||||
"ip='" + ip + '\'' +
|
||||
", useAuthority=" + useAuthority +
|
||||
", username='" + username + '\'' +
|
||||
", password='" + password + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,19 +12,19 @@ import java.util.Map;
|
||||
* @date 2023-05-17
|
||||
*/
|
||||
public class ServiceInfo {
|
||||
private String name;
|
||||
private Integer order = 0;
|
||||
private List<String> groups = new ArrayList<>();
|
||||
private Integer replicas = 0;
|
||||
private String sourceJar;
|
||||
private Map<String, Object> environments = new HashMap<>();
|
||||
private Map<String, Object> arguments = new HashMap<>();
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
public Integer getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
public void setOrder(Integer order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public List<String> getGroups() {
|
||||
@@ -70,7 +70,7 @@ public class ServiceInfo {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ServiceInfo{" +
|
||||
"name='" + name + '\'' +
|
||||
"order=" + order +
|
||||
", groups=" + groups +
|
||||
", replicas=" + replicas +
|
||||
", sourceJar='" + sourceJar + '\'' +
|
||||
|
||||
Reference in New Issue
Block a user