Aias00 commented on code in PR #6231:
URL: https://github.com/apache/shenyu/pull/6231#discussion_r2693215322
##########
shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/provider/RuleDataProvider.java:
##########
@@ -0,0 +1,15 @@
+package org.apache.shenyu.plugin.base.provider;
+import org.apache.shenyu.common.dto.RuleData;
+import org.apache.shenyu.common.dto.SelectorData;
+import org.apache.shenyu.plugin.base.cache.BaseDataCache;
+
+import java.util.Collections;
+import java.util.List;
+
+public class RuleDataProvider implements DataProvider<RuleData> {
+ @Override
+ public List<RuleData> getData(String ruleName) {
+ List<RuleData> data =
BaseDataCache.getInstance().obtainRuleData(ruleName);
+ return data != null ? data : Collections.emptyList();
+ }
+}
Review Comment:
@gumaomao pls check this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]