|
|
@@ -34,8 +34,8 @@ import java.util.List; |
|
|
|
public class FlowRuleNacosProvider implements DynamicRuleProvider<List<FlowRuleEntity>> { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Qualifier("configService") |
|
|
|
private ConfigService configService; |
|
|
|
@Qualifier("nacosConfiguration") |
|
|
|
private ConfigService nacosConfiguration; |
|
|
|
@Autowired |
|
|
|
private NacosProperties nacosProperties; |
|
|
|
@Autowired |
|
|
@@ -44,7 +44,7 @@ public class FlowRuleNacosProvider implements DynamicRuleProvider<List<FlowRuleE |
|
|
|
@Override |
|
|
|
public List<FlowRuleEntity> getRules(String appName) throws Exception { |
|
|
|
String dataId=new StringBuilder(appName).append(NacosConstants.DATA_ID_POSTFIX).toString(); |
|
|
|
String rules = configService.getConfig(dataId,nacosProperties.getGroupId(),3000); |
|
|
|
String rules = nacosConfiguration.getConfig(dataId,nacosProperties.getGroupId(),3000); |
|
|
|
//log.info("pull FlowRule from nacos Config:"+rules); |
|
|
|
if (rules.isEmpty()) { |
|
|
|
return new ArrayList<>(); |
|
|
|