mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-06 21:37:56 +08:00
[fix] 添加令牌密钥
This commit is contained in:
parent
1e89813793
commit
571fe7893d
@ -66,7 +66,17 @@ public class LazyNettyServerPropertiesQueryListCommand {
|
|||||||
*/
|
*/
|
||||||
@Schema(description ="类型(配置、DB)",name ="type",example = "")
|
@Schema(description ="类型(配置、DB)",name ="type",example = "")
|
||||||
private PropertiesType type;
|
private PropertiesType type;
|
||||||
|
/**
|
||||||
|
* 令牌key
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌key", name = "appKey", example = "")
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 令牌密钥
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌密钥", name = "appSecret", example = "")
|
||||||
|
private String appSecret;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 更新时间
|
* 更新时间
|
||||||
|
@ -65,7 +65,17 @@ public class LazyNettyServerPropertiesQueryOneCommand {
|
|||||||
*/
|
*/
|
||||||
@Schema(description ="类型(配置、DB)",name ="type",example = "")
|
@Schema(description ="类型(配置、DB)",name ="type",example = "")
|
||||||
private PropertiesType type;
|
private PropertiesType type;
|
||||||
|
/**
|
||||||
|
* 令牌key
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌key", name = "appKey", example = "")
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 令牌密钥
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌密钥", name = "appSecret", example = "")
|
||||||
|
private String appSecret;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 更新时间
|
* 更新时间
|
||||||
|
@ -66,7 +66,17 @@ public class LazyNettyServerPropertiesRemoveCommand {
|
|||||||
*/
|
*/
|
||||||
@Schema(description ="类型(配置、DB)",name ="type",example = "")
|
@Schema(description ="类型(配置、DB)",name ="type",example = "")
|
||||||
private PropertiesType type;
|
private PropertiesType type;
|
||||||
|
/**
|
||||||
|
* 令牌key
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌key", name = "appKey", example = "")
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 令牌密钥
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌密钥", name = "appSecret", example = "")
|
||||||
|
private String appSecret;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 更新时间
|
* 更新时间
|
||||||
|
@ -65,7 +65,17 @@ public class LazyNettyServerPropertiesStoryCommand {
|
|||||||
*/
|
*/
|
||||||
@Schema(description ="类型(配置、DB)",name ="type",example = "")
|
@Schema(description ="类型(配置、DB)",name ="type",example = "")
|
||||||
private PropertiesType type;
|
private PropertiesType type;
|
||||||
|
/**
|
||||||
|
* 令牌key
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌key", name = "appKey", example = "")
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 令牌密钥
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌密钥", name = "appSecret", example = "")
|
||||||
|
private String appSecret;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 更新时间
|
* 更新时间
|
||||||
|
@ -65,7 +65,17 @@ public class LazyNettyServerPropertiesUpdateCommand {
|
|||||||
*/
|
*/
|
||||||
@Schema(description ="类型(配置、DB)",name ="type",example = "")
|
@Schema(description ="类型(配置、DB)",name ="type",example = "")
|
||||||
private PropertiesType type;
|
private PropertiesType type;
|
||||||
|
/**
|
||||||
|
* 令牌key
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌key", name = "appKey", example = "")
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 令牌密钥
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌密钥", name = "appSecret", example = "")
|
||||||
|
private String appSecret;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 更新时间
|
* 更新时间
|
||||||
|
@ -65,7 +65,17 @@ public class LazyNettyServerPropertiesDTO {
|
|||||||
*/
|
*/
|
||||||
@Schema(description ="类型(配置、DB)",name ="type",example = "")
|
@Schema(description ="类型(配置、DB)",name ="type",example = "")
|
||||||
private PropertiesType type;
|
private PropertiesType type;
|
||||||
|
/**
|
||||||
|
* 令牌key
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌key", name = "appKey", example = "")
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 令牌密钥
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌密钥", name = "appSecret", example = "")
|
||||||
|
private String appSecret;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 更新时间
|
* 更新时间
|
||||||
|
@ -54,6 +54,8 @@ public class InitConfig implements CommandLineRunner, DisposableBean {
|
|||||||
String clientId = nettyClientProperties.getClientId();
|
String clientId = nettyClientProperties.getClientId();
|
||||||
String inetHost = nettyClientProperties.getInetHost();
|
String inetHost = nettyClientProperties.getInetHost();
|
||||||
int inetPort = nettyClientProperties.getInetPort();
|
int inetPort = nettyClientProperties.getInetPort();
|
||||||
|
String appKey = nettyClientProperties.getAppKey();
|
||||||
|
String appSecret = nettyClientProperties.getAppSecret();
|
||||||
if (Objects.isNull(clientId) ||
|
if (Objects.isNull(clientId) ||
|
||||||
Objects.isNull(inetHost)) {
|
Objects.isNull(inetHost)) {
|
||||||
log.warn("配置信息为空,请通过页面添加配置信息:{}", nettyClientProperties);
|
log.warn("配置信息为空,请通过页面添加配置信息:{}", nettyClientProperties);
|
||||||
@ -65,6 +67,9 @@ public class InitConfig implements CommandLineRunner, DisposableBean {
|
|||||||
lazyNettyServerPropertiesDO.setInetPort(inetPort);
|
lazyNettyServerPropertiesDO.setInetPort(inetPort);
|
||||||
lazyNettyServerPropertiesDO.setType(PropertiesType.CONFIG);
|
lazyNettyServerPropertiesDO.setType(PropertiesType.CONFIG);
|
||||||
lazyNettyServerPropertiesDO.setIsDeleted(false);
|
lazyNettyServerPropertiesDO.setIsDeleted(false);
|
||||||
|
lazyNettyServerPropertiesDO.setAppKey(appKey);
|
||||||
|
lazyNettyServerPropertiesDO.setAppSecret(appSecret);
|
||||||
|
|
||||||
// 根据服务端端口、port 唯一性验证
|
// 根据服务端端口、port 唯一性验证
|
||||||
boolean exists = lazyLambdaStream.exists(LazyWrappers.<LazyNettyServerPropertiesDO>lambdaWrapper()
|
boolean exists = lazyLambdaStream.exists(LazyWrappers.<LazyNettyServerPropertiesDO>lambdaWrapper()
|
||||||
.eq(LazyNettyServerPropertiesDO::getInetHost, inetHost)
|
.eq(LazyNettyServerPropertiesDO::getInetHost, inetHost)
|
||||||
|
@ -5,6 +5,7 @@ import lombok.experimental.Accessors;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.NettyClientStatus;
|
import org.framework.lazy.cloud.network.heartbeat.common.enums.NettyClientStatus;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.client.config.PropertiesType;
|
import org.framework.lazy.cloud.network.heartbeat.client.config.PropertiesType;
|
||||||
|
import org.wu.framework.lazy.orm.core.stereotype.LazyTableField;
|
||||||
|
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@ -65,7 +66,17 @@ public class LazyNettyServerProperties {
|
|||||||
*/
|
*/
|
||||||
@Schema(description ="类型(配置、DB)",name ="type",example = "")
|
@Schema(description ="类型(配置、DB)",name ="type",example = "")
|
||||||
private PropertiesType type;
|
private PropertiesType type;
|
||||||
|
/**
|
||||||
|
* 令牌key
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌key", name = "appKey", example = "")
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 令牌密钥
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌密钥", name = "appSecret", example = "")
|
||||||
|
private String appSecret;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 更新时间
|
* 更新时间
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
package org.framework.lazy.cloud.network.heartbeat.client.infrastructure.entity;
|
package org.framework.lazy.cloud.network.heartbeat.client.infrastructure.entity;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.NettyClientStatus;
|
|
||||||
import org.framework.lazy.cloud.network.heartbeat.client.config.PropertiesType;
|
import org.framework.lazy.cloud.network.heartbeat.client.config.PropertiesType;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.common.enums.NettyClientStatus;
|
||||||
import org.wu.framework.lazy.orm.core.stereotype.LazyTable;
|
import org.wu.framework.lazy.orm.core.stereotype.LazyTable;
|
||||||
import org.wu.framework.lazy.orm.core.stereotype.LazyTableField;
|
import org.wu.framework.lazy.orm.core.stereotype.LazyTableField;
|
||||||
import org.wu.framework.lazy.orm.core.stereotype.*;
|
import org.wu.framework.lazy.orm.core.stereotype.LazyTableFieldUnique;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
|
|
||||||
import java.lang.String;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.lang.Integer;
|
|
||||||
/**
|
/**
|
||||||
* describe 服务端配置信息
|
* describe 服务端配置信息
|
||||||
*
|
*
|
||||||
@ -75,6 +73,20 @@ public class LazyNettyServerPropertiesDO {
|
|||||||
@LazyTableField(name="is_deleted",comment="是否删除")
|
@LazyTableField(name="is_deleted",comment="是否删除")
|
||||||
private Boolean isDeleted;
|
private Boolean isDeleted;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 令牌key
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌key", name = "appKey", example = "")
|
||||||
|
@LazyTableField(name = "app_key", comment = "令牌key")
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 令牌密钥
|
||||||
|
*/
|
||||||
|
@Schema(description = "令牌密钥", name = "appSecret", example = "")
|
||||||
|
@LazyTableField(name = "app_secret", comment = "令牌密钥")
|
||||||
|
private String appSecret;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 类型(配置、DB)
|
* 类型(配置、DB)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user