yangys
2024-03-27 e48aa2ac8dea1be5db11c63edf0b912c4ad5ce65
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.qianwen.core.launch.constant;
 
public interface NacosConstant {
    public static final String NACOS_ADDR = "127.0.0.1:8848";
    public static final String NACOS_CONFIG_PREFIX = "blade";
    public static final String NACOS_GROUP_SUFFIX = "-group";
    public static final String NACOS_CONFIG_FORMAT = "yaml";
    public static final String NACOS_CONFIG_JSON_FORMAT = "json";
    public static final String NACOS_CONFIG_REFRESH = "true";
    public static final String NACOS_CONFIG_GROUP = "DEFAULT_GROUP";
    public static final String NACOS_SEATA_GROUP = "SEATA_GROUP";
 
    static String dataId(String appName) {
        return appName + ".yaml";
    }
 
    static String dataId(String appName, String profile) {
        return dataId(appName, profile, "yaml");
    }
 
    static String dataId(String appName, String profile, String format) {
        return appName + "-" + profile + "." + format;
    }
 
    static String sharedDataId() {
        return "blade.yaml";
    }
 
    static String sharedDataId(String profile) {
        return AppConstant.APPLICATION_NAME_PREFIX + profile + ".yaml";
    }
 
    static String sharedDataIds(String profile) {
        return "blade.yaml,blade-" + profile + ".yaml";
    }
}