apollo读取带命名空间的属性值
·

import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;
Config config = ConfigService.getConfig(AccessTokenEnum.NAMESPACE.getValue());
if(config == null){
throw new BusinessException("501", "获取token参数信息异常");
}
String appId = config.getProperty(AccessTokenEnum.APP_ID.getValue(),"");
String secret = config.getProperty(AccessTokenEnum.SECRET.getValue(),"");

更多推荐
所有评论(0)