天天看点

ali sentinel 1.8 (含spring clound starter)的配置方法

sentinel的config 分为3个主要部分:

1、sentinel core里面的SentinelConfig 及SentinelConfigLoader类

2、sentinel core里面的LogBase及LogConfigLoader类

3、spring-cloud-starter-alibaba-sentinel 里面的SentinelProperties类

SentinelConfigLoader及LogConfigLoader

LogConfigLoader及SentinelConfigLoader都是负责从system env及sentinel.properties,不知道为何同时存在。

SentinelConfigLoader的关键代码如下:

public static final String SENTINEL_CONFIG_ENV_KEY = "CSP_SENTINEL_CONFIG_FILE";
    public static final String SENTINEL_CONFIG_PROPERTY_KEY            

继续阅读