-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: optimize the discovery inject logic and fix nacos config not working issue * feat: 删除无用的导入 * feat: 增加actuator到demo中 * fix: add lossless healthcheck for example * fix: add configuration comments
- Loading branch information
1 parent
bf9bbdd
commit 7bc4c23
Showing
18 changed files
with
59 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
plugins.enable=spring-cloud-2021-plugin,spring-cloud-2020-plugin | ||
plugins.enable=spring-cloud-2023-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 26 additions & 47 deletions
73
...ns/spring-cloud-2023-plugin/src/main/conf/plugin/spring-cloud-2023/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,40 @@ | ||
# 应用名称(必填) | ||
# the application name for spring cloud, register as the service name in registry center | ||
spring.application.name=application-name | ||
# 配置北极星服务端地址 | ||
# polaris server address | ||
spring.cloud.polaris.address=grpc\://127.0.0.1\:8091 | ||
# switch for spring cloud polaris all features | ||
spring.cloud.polaris.enabled=true | ||
|
||
# 启用 Java Agent 的 Spring Cloud Tencent 注册发现能力 | ||
# switch for spring cloud discovery feature | ||
spring.cloud.discovery.enabled=true | ||
# 配置服务注册发现的命名空间信息 | ||
# service discovery namespace value | ||
spring.cloud.polaris.discovery.namespace=default | ||
# 启用从北极星 | ||
# switch for polaris discovery feature | ||
spring.cloud.polaris.discovery.enabled=true | ||
# switch for polaris discovery(register) feature | ||
spring.cloud.polaris.discovery.register=true | ||
|
||
## 是否启用北极星的 LoadBalancer | ||
# switch for polaris loadbalancer feature | ||
spring.cloud.polaris.loadbalancer.enabled=true | ||
#spring.cloud.polaris.loadbalancer.discoveryType=POLARIS | ||
#spring.cloud.polaris.loadbalancer.strategy=random | ||
|
||
## 是否启用北极星服务路由能力 | ||
spring.cloud.polaris.router.enabled=false | ||
# 是否启用北极星的自定义路由能力 | ||
spring.cloud.polaris.router.rule-router.enabled=false | ||
# 是否启用北极星的元数据路由能力 | ||
spring.cloud.polaris.router.metadata-router.enabled=false | ||
# 是否启用北极星的就近路由能力 | ||
spring.cloud.polaris.router.nearby-router.enabled=false | ||
|
||
## 是否启用北极星的服务限流能力 | ||
# switch for polaris router feature | ||
spring.cloud.polaris.router.enabled=true | ||
# switch for polaris router(rule-router) feature | ||
spring.cloud.polaris.router.rule-router.enabled=true | ||
# switch for polaris router(metadata-router) feature | ||
spring.cloud.polaris.router.metadata-router.enabled=true | ||
# switch for polaris router(nearby-router) feature | ||
spring.cloud.polaris.router.nearby-router.enabled=true | ||
# switch for polaris ratelimit feature | ||
spring.cloud.polaris.ratelimit.enabled=false | ||
# 设置触发限流时的提示信息 | ||
# spring.cloud.polaris.ratelimit.rejectRequestTips="" | ||
# 设置触发限流时的响应码 | ||
# rejectHttpCode for polaris ratelimit, will be returned as limited | ||
spring.cloud.polaris.ratelimit.rejectHttpCode=429 | ||
# 设置限流匀速排队最大排队时间 | ||
# maxQueuingTime for polaris ratelimit | ||
spring.cloud.polaris.ratelimit.maxQueuingTime=1000 | ||
|
||
## RPC 调用增强 | ||
spring.cloud.tencent.rpc-enhancement.enabled=false | ||
# 开启 RPC 调用结果上报 | ||
spring.cloud.tencent.rpc-enhancement.reporter.enabled=false | ||
|
||
# 配置北极星监控指标上报 | ||
# switch for rpc-enhancement feature | ||
spring.cloud.tencent.rpc-enhancement.enabled=true | ||
# switch for rpc-enhancement reporter feature | ||
spring.cloud.tencent.rpc-enhancement.reporter.enabled=true | ||
# switch for polaris stat feature | ||
spring.cloud.polaris.stat.enabled=false | ||
# 指标上报监听端口 | ||
# port for polaris stat | ||
spring.cloud.polaris.stat.port=0 | ||
# 指标上报暴露的 http path | ||
# path for polaris stat | ||
spring.cloud.polaris.stat.path=/metrics | ||
|
||
|
||
## 开启双注册双发现到 nacos(默认情况不开启) | ||
#spring.cloud.nacos.enabled=false | ||
## 设置 nacos 服务注册中心的地址 | ||
#spring.cloud.nacos.discovery.server-addr=127.0.0.1\:8848 | ||
## 设置 nacos 的账户信息 | ||
#spring.cloud.nacos.username=nacos | ||
#spring.cloud.nacos.password=nacos | ||
## 是否开启从 nacos 拉取服务实例信息 | ||
#spring.cloud.nacos.discovery.enabled=false | ||
## 是否开启将服务注册到 nacos | ||
#spring.cloud.nacos.discovery.register-enabled=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 0 additions & 48 deletions
48
.../cn/polarismesh/agent/plugin/spring/cloud/interceptor/EnvironmentChangeEventListener.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters