package com.alibaba.csp.sentinel.dashboard.rule.nacos;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author lfdc
 * @version 1.0
 * @className NacosConfigProperties
 * @description nacos配置文件读取
 * @company sckw
 * @date 2023-06-07 10:06:18
 */
@Configuration
@ConfigurationProperties(prefix = "sentinel.nacos")
public class NacosConfigProperties {
    //nacos服务地址
    @Value("${sentinel.nacos.serverAddr}")
    private String serverAddr;
    //nacos登录名
    @Value("${sentinel.nacos.username}")
    private String username;

    //nacos登录密码
    @Value("${sentinel.nacos.password}")
    private String password;
    //nacos命名空间
    @Value("${sentinel.nacos.namespace}")
    private String namespace;

    private String dataId;

    private String groupId = "SENTINEL_GROUP";

    public String getServerAddr() {
        return serverAddr;
    }

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

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNamespace() {
        return namespace;
    }

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

    public String getDataId() {
        return dataId;
    }

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

    public String getGroupId() {
        return groupId;
    }

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

