[+] 添加集群配置

This commit is contained in:
acgist
2023-01-15 20:05:22 +08:00
parent fed00218fb
commit 03f34ca888
7 changed files with 102 additions and 6 deletions

View File

@@ -0,0 +1,47 @@
package com.acgist.taoyao.boot.property;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
/**
* 节点配置
*
* @author acgist
*/
@Getter
@Setter
@Schema(title = "节点配置", description = "节点配置")
public class NodeProperties {
/**
* 节点主机
*/
@Schema(title = "节点主机", description = "节点主机")
private String host;
/**
* 节点端口
*/
@Schema(title = "节点端口", description = "节点端口")
private Integer port;
/**
* 用户
*/
@Schema(title = "节点用户", description = "节点用户")
@JsonIgnore
private String username;
/**
* 密码
*/
@Schema(title = "节点密码", description = "节点密码")
@JsonIgnore
private String password;
/**
* 服务节点ID
*/
@Schema(title = "服务节点ID", description = "服务节点ID")
private String serverId;
}

View File

@@ -2,6 +2,7 @@ package com.acgist.taoyao.boot.property;
import org.springframework.boot.context.properties.ConfigurationProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -16,24 +17,35 @@ import lombok.Setter;
public class TaoyaoProperties {
/**
* 地址
* 项目地址
*/
@Schema(title = "项目地址", description = "项目地址")
private String url;
/**
* 名称
* 项目名称
*/
@Schema(title = "项目名称", description = "项目名称")
private String name;
/**
* 超时时间
*/
@Schema(title = "超时时间", description = "超时时间")
private Long timeout;
/**
* 版本
* 项目版本
*/
@Schema(title = "项目版本", description = "项目版本")
private String version;
/**
* 描述
* 项目描述
*/
@Schema(title = "项目描述", description = "项目描述")
private String description;
/**
* 服务节点ID
* 集群使用
*/
@Schema(title = "服务节点ID", description = "服务节点ID")
private String serverId;
}