From 8525e1536762a37740e73e41a00f2c5c2a5aaaea Mon Sep 17 00:00:00 2001
From: hongqiaowei
Date: Tue, 29 Mar 2022 16:54:47 +0800
Subject: [PATCH 1/4] Add FizzGatewayNodeStatSchedConfig to
fizz-spring-boot-starter spring.factories
---
.../src/main/resources/META-INF/spring.factories | 1 +
1 file changed, 1 insertion(+)
diff --git a/fizz-spring-boot-starter/src/main/resources/META-INF/spring.factories b/fizz-spring-boot-starter/src/main/resources/META-INF/spring.factories
index 184e664..d6a8789 100644
--- a/fizz-spring-boot-starter/src/main/resources/META-INF/spring.factories
+++ b/fizz-spring-boot-starter/src/main/resources/META-INF/spring.factories
@@ -8,6 +8,7 @@ we.config.ProxyWebClientConfig,\
we.config.RefreshLocalCacheConfig,\
we.config.SystemConfig,\
we.config.WebServerConfig,\
+we.config.FizzGatewayNodeStatSchedConfig,\
we.controller.HealthCheckController,\
we.controller.CacheCheckController,\
we.controller.CallbackController,\
From f16e231837d3d390be480759ea5e9d3109b7be44 Mon Sep 17 00:00:00 2001
From: hongqiaowei
Date: Tue, 29 Mar 2022 17:00:20 +0800
Subject: [PATCH 2/4] Upgrade fastjson to 1.2.80
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index c726ce2..9d70ba5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -150,7 +150,7 @@
com.alibaba
fastjson
- 1.2.79
+ 1.2.80
From 5e7e26e46e0e1af5b68103021c7b11c160a6e739 Mon Sep 17 00:00:00 2001
From: hongqiaowei
Date: Tue, 29 Mar 2022 18:28:12 +0800
Subject: [PATCH 3/4] Nacos service registration support username and password
---
.../nacos/FizzNacosHelper.java | 22 ++++++++++++++-----
.../nacos/FizzNacosProperties.java | 16 +++++++++++++-
2 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/fizz-core/src/main/java/we/service_registry/nacos/FizzNacosHelper.java b/fizz-core/src/main/java/we/service_registry/nacos/FizzNacosHelper.java
index 92d5807..f0fac50 100644
--- a/fizz-core/src/main/java/we/service_registry/nacos/FizzNacosHelper.java
+++ b/fizz-core/src/main/java/we/service_registry/nacos/FizzNacosHelper.java
@@ -20,11 +20,13 @@ package we.service_registry.nacos;
import com.alibaba.cloud.nacos.NacosServiceManager;
import com.alibaba.cloud.nacos.registry.NacosRegistration;
import com.alibaba.cloud.nacos.registry.NacosServiceRegistry;
+import com.alibaba.nacos.api.PropertyKeyConst;
import com.alibaba.nacos.api.naming.NamingService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.ApplicationContext;
import org.springframework.core.env.Environment;
import we.util.Consts;
+import we.util.JacksonUtils;
import we.util.PropertiesUtils;
import we.util.ReflectionUtils;
@@ -45,14 +47,21 @@ public abstract class FizzNacosHelper {
Properties ps = new Properties();
for (String propertyName : nacosProperties.stringPropertyNames()) {
- String pn = propertyName.substring(ndl);
- if (pn.indexOf(Consts.S.DASH) > -1) {
- pn = PropertiesUtils.normalize(pn);
+ String propertyValue = nacosProperties.getProperty(propertyName);
+ if (propertyName.endsWith(PropertyKeyConst.USERNAME)) {
+ ps.setProperty(PropertyKeyConst.USERNAME, propertyValue);
+ } else if (propertyName.endsWith(PropertyKeyConst.PASSWORD)) {
+ ps.setProperty(PropertyKeyConst.PASSWORD, propertyValue);
+ } else {
+ String pn = propertyName.substring(ndl);
+ if (pn.indexOf(Consts.S.DASH) > -1) {
+ pn = PropertiesUtils.normalize(pn);
+ }
+ ps.setProperty(pn, propertyValue);
}
- ps.setProperty(pn, nacosProperties.getProperty(propertyName));
}
- FizzNacosProperties fizzNacosProperties = new FizzNacosProperties();
+ FizzNacosProperties fizzNacosProperties = new FizzNacosProperties(ps);
PropertiesUtils.setBeanPropertyValue(fizzNacosProperties, ps);
fizzNacosProperties.setApplicationContext(applicationContext);
@@ -84,7 +93,8 @@ public abstract class FizzNacosHelper {
NacosServiceManager nacosServiceManager = new NacosServiceManager();
ReflectionUtils.set(nacosServiceRegistry, "nacosServiceManager", nacosServiceManager);
NacosRegistration nacosRegistration = new NacosRegistration(null, fizzNacosProperties, applicationContext);
- NamingService namingService = nacosServiceManager.getNamingService(fizzNacosProperties.getNacosProperties());
+ Properties nps = fizzNacosProperties.getNacosProperties();
+ NamingService namingService = nacosServiceManager.getNamingService(nps);
return new FizzNacosServiceRegistration(fizzNacosProperties.getId(), nacosRegistration, nacosServiceRegistry, namingService);
}
}
diff --git a/fizz-core/src/main/java/we/service_registry/nacos/FizzNacosProperties.java b/fizz-core/src/main/java/we/service_registry/nacos/FizzNacosProperties.java
index 63e734e..ede338e 100644
--- a/fizz-core/src/main/java/we/service_registry/nacos/FizzNacosProperties.java
+++ b/fizz-core/src/main/java/we/service_registry/nacos/FizzNacosProperties.java
@@ -99,6 +99,12 @@ public class FizzNacosProperties extends NacosDiscoveryProperties {
private boolean init = false;
+ private Properties config;
+
+ public FizzNacosProperties(Properties config) {
+ this.config = config;
+ }
+
public void init() {
if (init) {
return;
@@ -452,9 +458,17 @@ public class FizzNacosProperties extends NacosDiscoveryProperties {
properties.put(NAMING_LOAD_CACHE_AT_START, namingLoadCacheAtStart);
properties.put("enabled", true);
- properties.put("server-addr", this.getServerAddr());
+ // properties.put("server-addr", serverAddr);
properties.put("com.alibaba.nacos.naming.log.filename", "");
+ config.forEach(
+ (c, v) -> {
+ if (!properties.containsKey(c)) {
+ properties.put(c, v);
+ }
+ }
+ );
+
return properties;
}
}
From c98a58d66ab69aa900df5be7b24afa1d5c98fc29 Mon Sep 17 00:00:00 2001
From: hongqiaowei
Date: Tue, 29 Mar 2022 18:32:14 +0800
Subject: [PATCH 4/4] Release 2.6.0
---
README.en-us.md | 3 ++-
README.md | 3 ++-
fizz-bootstrap/pom.xml | 2 +-
fizz-common/pom.xml | 2 +-
fizz-core/pom.xml | 2 +-
fizz-plugin/pom.xml | 2 +-
fizz-spring-boot-starter/pom.xml | 2 +-
pom.xml | 2 +-
8 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/README.en-us.md b/README.en-us.md
index 9dd0ce1..01fd306 100644
--- a/README.en-us.md
+++ b/README.en-us.md
@@ -4,7 +4,7 @@ English | [简体中文](./README.md)
-
+
@@ -120,6 +120,7 @@ Starting from v1.3.0, the frontend and backend of the management backend are mer
| v2.5.0 | v2.5.0 |
| v2.5.1 | v2.5.1 |
| v2.5.2 | v2.5.2 |
+| v2.6.0 | v2.6.0 |
Please download the corresponding management backend version according to the version of the community version
diff --git a/README.md b/README.md
index 5fe0a09..ad9d609 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
-
+
@@ -118,6 +118,7 @@ API地址:http://demo.fizzgate.com/proxy/[服务名]/[API_Path]
| v2.5.0 | v2.5.0 |
| v2.5.1 | v2.5.1 |
| v2.5.2 | v2.5.2 |
+| v2.6.0 | v2.6.0 |
请根据社区版的版本下载对应的管理后台版本
diff --git a/fizz-bootstrap/pom.xml b/fizz-bootstrap/pom.xml
index 378d3e5..b01db33 100644
--- a/fizz-bootstrap/pom.xml
+++ b/fizz-bootstrap/pom.xml
@@ -12,7 +12,7 @@
com.fizzgate
fizz-bootstrap
- 2.6
+ 2.6.0
1.8
diff --git a/fizz-common/pom.xml b/fizz-common/pom.xml
index 6215c3b..6956281 100644
--- a/fizz-common/pom.xml
+++ b/fizz-common/pom.xml
@@ -5,7 +5,7 @@
fizz-gateway-community
com.fizzgate
- 2.6
+ 2.6.0
../pom.xml
4.0.0
diff --git a/fizz-core/pom.xml b/fizz-core/pom.xml
index e29ebda..1bc7940 100644
--- a/fizz-core/pom.xml
+++ b/fizz-core/pom.xml
@@ -5,7 +5,7 @@
fizz-gateway-community
com.fizzgate
- 2.6
+ 2.6.0
../pom.xml
4.0.0
diff --git a/fizz-plugin/pom.xml b/fizz-plugin/pom.xml
index 5e2ec3e..d622264 100644
--- a/fizz-plugin/pom.xml
+++ b/fizz-plugin/pom.xml
@@ -5,7 +5,7 @@
fizz-gateway-community
com.fizzgate
- 2.6
+ 2.6.0
../pom.xml
4.0.0
diff --git a/fizz-spring-boot-starter/pom.xml b/fizz-spring-boot-starter/pom.xml
index 8ce2fdc..0c201bb 100644
--- a/fizz-spring-boot-starter/pom.xml
+++ b/fizz-spring-boot-starter/pom.xml
@@ -5,7 +5,7 @@
fizz-gateway-community
com.fizzgate
- 2.6
+ 2.6.0
../pom.xml
4.0.0
diff --git a/pom.xml b/pom.xml
index 9d70ba5..a927595 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,7 +37,7 @@
fizz-gateway-community
${project.artifactId}
fizz gateway community
- 2.6
+ 2.6.0
pom
fizz-common