You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2022/04/26 01:16:58 UTC

[servicecomb-java-chassis] branch master updated: [#2795]Fixed the issue that the dynamic modification configuration of gray release is invalid. (#2799)

This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
     new 67cc3c527 [#2795]Fixed the issue that the dynamic modification configuration of gray release is invalid.  (#2799)
67cc3c527 is described below

commit 67cc3c52756b45e268da6530649ab0ead0b7f12a
Author: longiiin <13...@163.com>
AuthorDate: Tue Apr 26 09:16:53 2022 +0800

    [#2795]Fixed the issue that the dynamic modification configuration of gray release is invalid.  (#2799)
---
 .../org/apache/servicecomb/router/cache/RouterRuleCache.java  | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/governance/src/main/java/org/apache/servicecomb/router/cache/RouterRuleCache.java b/governance/src/main/java/org/apache/servicecomb/router/cache/RouterRuleCache.java
index eb900c773..9d3133043 100644
--- a/governance/src/main/java/org/apache/servicecomb/router/cache/RouterRuleCache.java
+++ b/governance/src/main/java/org/apache/servicecomb/router/cache/RouterRuleCache.java
@@ -47,12 +47,7 @@ public class RouterRuleCache {
 
   private static final String ROUTE_RULE = "servicecomb.routeRule.%s";
 
-  private Environment environment;
-
-  @Autowired
-  public RouterRuleCache(Environment environment) {
-    this.environment = environment;
-  }
+  private final Environment environment;
 
   private final ConcurrentHashMap<String, ServiceInfoCache> serviceInfoCacheMap = new ConcurrentHashMap<>();
 
@@ -60,7 +55,9 @@ public class RouterRuleCache {
 
   private final Representer representer = new Representer();
 
-  public RouterRuleCache() {
+  @Autowired
+  public RouterRuleCache(Environment environment) {
+    this.environment = environment;
     representer.getPropertyUtils().setSkipMissingProperties(true);
     GovernanceEventManager.register(this);
   }