-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Optimize]Connector增改接口的configs字段名调整为config (#1080)
1、保持和原生一致; 2、当前是兼容状态,可同时支持configs和config;
- Loading branch information
Showing
6 changed files
with
46 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 13 additions & 5 deletions
18
...om/xiaojukeji/know/streaming/km/common/bean/dto/connect/connector/ConnectorCreateDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,36 @@ | ||
package com.xiaojukeji.know.streaming.km.common.bean.dto.connect.connector; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.xiaojukeji.know.streaming.km.common.bean.dto.connect.ClusterConnectorDTO; | ||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.validation.constraints.NotNull; | ||
import java.util.Properties; | ||
|
||
/** | ||
* @author zengqiao | ||
* @date 2022-10-17 | ||
*/ | ||
@Data | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@NoArgsConstructor | ||
@ApiModel(description = "创建Connector") | ||
public class ConnectorCreateDTO extends ClusterConnectorDTO { | ||
@NotNull(message = "configs不允许为空") | ||
@ApiModelProperty(value = "配置", example = "") | ||
@Deprecated | ||
@ApiModelProperty(value = "配置, 优先使用config字段,3.5.0版本将删除该字段", example = "") | ||
protected Properties configs; | ||
|
||
public ConnectorCreateDTO(Long connectClusterId, String connectorName, Properties configs) { | ||
@ApiModelProperty(value = "配置", example = "") | ||
protected Properties config; | ||
|
||
public ConnectorCreateDTO(Long connectClusterId, String connectorName, Properties config) { | ||
super(connectClusterId, connectorName); | ||
this.configs = configs; | ||
this.config = config; | ||
} | ||
|
||
public Properties getSuitableConfig() { | ||
return config != null? config: configs; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters