Pārlūkot izejas kodu

nacos持久化

master
wangjx pirms 3 gadiem
vecāks
revīzija
81e5148a30
2 mainītis faili ar 31 papildinājumiem un 16 dzēšanām
  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 Parādīt failu

@@ -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 Parādīt failu

@@ -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;
}
}

Notiek ielāde…
Atcelt
Saglabāt