瀏覽代碼

nacos持久化

master
wangjx 3 年之前
父節點
當前提交
81e5148a30
共有 2 個檔案被更改,包括 31 行新增16 行删除
  1. +0
    -6
      sentinel-dashboard/pom.xml
  2. +31
    -10
      sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/config/NacosPropertiesConfiguration.java

+ 0
- 6
sentinel-dashboard/pom.xml 查看文件

@@ -136,12 +136,6 @@
<scope>test</scope>
</dependency>

<!--lombok 注解-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>


+ 31
- 10
sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/config/NacosPropertiesConfiguration.java 查看文件

@@ -17,8 +17,6 @@ package com.alibaba.csp.sentinel.dashboard.config;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.boot.context.properties.ConfigurationProperties;
import lombok.Getter;
import lombok.Setter;
import org.springframework.stereotype.Component;

/**
@@ -29,17 +27,40 @@ import org.springframework.stereotype.Component;
@ConfigurationProperties(prefix="sentinel.nacos")
public class NacosPropertiesConfiguration {

@Getter
@Setter
private String serverAddr;
@Getter
@Setter
private String dataId;
@Getter
@Setter
private String groupId;
@Getter
@Setter
private String namespace;

public String getServerAddr() {
return serverAddr;
}

public String getDataId() {
return dataId;
}

public String getGroupId() {
return groupId;
}

public String getNamespace() {
return namespace;
}

public void setServerAddr(String serverAddr) {
this.serverAddr = serverAddr;
}

public void setDataId(String dataId) {
this.dataId = dataId;
}

public void setGroupId(String groupId) {
this.groupId = groupId;
}

public void setNamespace(String namespace) {
this.namespace = namespace;
}
}

Loading…
取消
儲存