春节刚过,Apache ShenYu 便迎来了 2.5.1 版本。此次发布内容,共有 250+ 个 Pull Request ,60+ 位贡献者的参与。新增了若干功能,修复了 bug,优化了若干内容。
新功能
- 添加
bRPC 插件
- 在网关中引入
bRPC 插件 引入网关对 bRPC 的代理插件,在网关的 pom.xml 文件中增加如下依赖:
<!-- apache shenyu brpc plugin -->
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-brpc</artifactId>
<version>${project.version}</version>
</dependency>
bRPC 服务接入网关
在由 bRPC 构建的微服务中,引入如下依赖:
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-client-brpc</artifactId>
<version>${shenyu.version}</version>
</dependency>
- 在
application.yaml 配置文件增加如下配置:
server:
port: 8011
address: 0.0.0.0
servlet:
context-path: /
spring:
main:
allow-bean-definition-overriding: true
application:
name: brpc-exmaples
shenyu:
register:
registerType: http #zookeeper #etcd #nacos #consul
serverLists: http://localhost:9095 #localhost:2181 #http://localhost:2379 #localhost:8848
props:
username: admin
password: 123456
client:
brpc:
props:
contextPath: /brpc
ipAndPort: brpc
appName: brpc
port: 8005
host: 127.0.0.1
# starlight
starlight:
server:
enable: true
port: 8005
关于 bRPC 插件的更多使用请参考
https://shenyu.apache.org/zh/docs/plugin-center/proxy/brpc-plugin
- 支持
Nacos不同命名空间
具体实现请参考: https://github.com/apache/shenyu/pull/4258
- 优化
mock 插件
具体实现请参考:https://github.com/apache/shenyu/pull/4256
- 注册中心实例支持
eureka
具体实现请参考:https://github.com/apache/shenyu/pull/4144
- 支持
API 文档
具体实现请参考: https://github.com/apache/shenyu/pull/4263
- 添加
Sentinel 插件的规则处理参数
具体实现请参考:https://github.com/apache/shenyu/pull/3982
- 添加
e2e 测试引擎 支持Apache ShenYu的 End to End 测试。
具体实现请参考:https://github.com/apache/shenyu/pull/3942
- 添加
casdoor 插件支持SSO
具体使用请参考:https://shenyu.apache.org/zh/docs/plugin-center/security/casdoor
- 添加
logging-tencent-cls 插件 该插件用于支持收集日志到Tencent cls日志平台,并通过Tencent cls日志平台进行数据分析。
具体使用请参考:https://shenyu.apache.org/zh/docs/plugin-center/observability/logging-tencent-cls
- 添加
logging-clickhouse插件
具体实现请参考: https://github.com/apache/shenyu/pull/3832
添加 logging-pulsar 插件
通过Pulsar收集网关http请求日志,通过其他应用消费Pulsar消息,并且对日志进行分析。
架构图:
![]()
插件使用流程图
![]()
具体使用请参考: https://shenyu.apache.org/zh/docs/plugin-center/observability/logging-pulsar
- 添加
key-auth 插件
具体实现请参考:https://github.com/apache/shenyu/pull/3756
增强
- 优化
motan 客户端注解
具体实现请参考:https://github.com/apache/shenyu/pull/3889
- 优化
motan插件配置
具体实现请参考: https://github.com/apache/shenyu/pull/3851
- 优化
websocket 客户端注解
具体实现请参考:https://github.com/apache/shenyu/pull/3853
- 优化
springcloud客户端注解
具体实现请参考: https://github.com/apache/shenyu/pull/3819
- 优化
springmvc 客户端注解
具体实现请参考:https://github.com/apache/shenyu/pull/3819
重构
- 重构
API文档的mock请求
具体实现请参考:https://github.com/apache/shenyu/pull/4311
- 重构
logging-clickhouse 插件
具体实现请参考:https://github.com/apache/shenyu/pull/3832
- 优化
dubbo相关maven依赖
具体实现请参考:https://github.com/apache/shenyu/pull/4289
- 重构
sign 插件
具体实现请参考:https://github.com/apache/shenyu/pull/4304
- 更新
ShenyuExtConfiguration
具体实现请参考:https://github.com/apache/shenyu/pull/4259
- 移除不必要的单例
具体实现请参考:https://github.com/apache/shenyu/pull/4230
- 修复并发场景
mock数据
具体实现请参考:https://github.com/apache/shenyu/pull/4229
- 重构
sdk 测试
具体实现请参考:https://github.com/apache/shenyu/pull/4226
- 重构
DefaultSignService
具体实现请参考:https://github.com/apache/shenyu/pull/4217
- 重构
shenyu-admin 规则
具体实现请参考:https://github.com/apache/shenyu/pull/4210
- 优化
ShaUtil
具体实现请参考:https://github.com/apache/shenyu/pull/4205
- 优化缓存
具体实现请参考:https://github.com/apache/shenyu/pull/4197
- 修复
ConcurrentModificationException
具体实现请参考:https://github.com/apache/shenyu/pull/4155
- 修复
etcd 数据同步
具体实现请参考:https://github.com/apache/shenyu/pull/4141
- 重构
sdk 客户端
具体实现请参考:https://github.com/apache/shenyu/pull/4130
- 优化请求超时
具体实现请参考:https://github.com/apache/shenyu/pull/4070
- 重构日志模块
具体实现请参考:https://github.com/apache/shenyu/pull/3917
- 重构
springcloud 客户端
具体实现请参考:https://github.com/apache/shenyu/pull/4001
- 重构
Motan插件
具体实现请参考:https://github.com/apache/shenyu/pull/3959
- 重构
admin 数据同步
具体实现请参考:https://github.com/apache/shenyu/pull/3940
- 重构
tars 客户端
具体实现请参考:https://github.com/apache/shenyu/pull/3938
- 重构
alibaba-dubbo 客户端
具体实现请参考:https://github.com/apache/shenyu/pull/3935
- 重构
springmvc 客户端
具体实现请参考:https://github.com/apache/shenyu/pull/3931
- 重构
admin 配置
具体实现请参考:https://github.com/apache/shenyu/pull/3918
- 优化随机算法
具体实现请参考:https://github.com/apache/shenyu/pull/3911
- 重构负载均衡算法
具体实现请参考:https://github.com/apache/shenyu/pull/3890
- 重构
logging-kafka 插件
具体实现请参考:https://github.com/apache/shenyu/pull/3885
错误修复
- 移除多余的
cookie 设置
具体实现请参考:https://github.com/apache/shenyu/pull/4283
- 修复
appAuth删除逻辑
具体实现请参考:https://github.com/apache/shenyu/pull/4268
- 修复
Cryptor-Request 插件
具体实现请参考:https://github.com/apache/shenyu/pull/4267
- 修复
ext 插件
具体实现请参考:https://github.com/apache/shenyu/pull/4260
- 修复升级脚本
具体实现请参考:https://github.com/apache/shenyu/pull/4194
- 修复
Nacos 注册空指针问题
具体实现请参考:https://github.com/apache/shenyu/pull/4176
- 修复
sandbox json 解析
具体实现请参考:https://github.com/apache/shenyu/pull/4170
- 修复插件更新时的异常
具体实现请参考:https://github.com/apache/shenyu/pull/4146
- 修复
postgresql 脚本
具体实现请参考:https://github.com/apache/shenyu/pull/4091
- 修复
sentinel 插件的异常
具体实现请参考:https://github.com/apache/shenyu/pull/3954
- 修复
TencentClsLog异常
具体实现请参考:https://github.com/apache/shenyu/pull/3951
- 修复更新密码异常
具体实现请参考:https://github.com/apache/shenyu/pull/3898
- 修复选择器分页异常
具体实现请参考:https://github.com/apache/shenyu/pull/3875
- 修复
request 插件异常
具体实现请参考:https://github.com/apache/shenyu/pull/3872
- 修复
RateLimiter插件并发处理异常
具体实现请参考:https://github.com/apache/shenyu/pull/3852
- 修复
sign 插件异常
具体实现请参考:https://github.com/apache/shenyu/pull/4267
- 修复
context-path 插件异常
具体实现请参考:https://github.com/apache/shenyu/pull/4260
贡献者
特别感谢以下贡献者对 2.5.1版本的支持和参与(排名不分先后)。
dragon-zhang, zhengpeng, mahaitao, 愿凌飞, hdgaadd, dayu, SongTao Zhuan g, Misaya295 , Shawn Jim , yunlongn , Will , moremind , RayayChung , Kevin Clair , huanccwang , 柯杨 , Kunshuai Zhu , fantiq , youzipi , class , kyeongsun , 杨阳洋 , Liming Deng , 杨文杰 , xcsnx , hnxiaoyuan , dependabot , xiaoyu , wzhangNJ , Zihao Huang , ywj1352 , pandaapo , WuLang , Nineteen , kyeongsun , ableYang , Runqi Zhao , WeiS , Luke.Z , lahmxu , Sinsy , Daming , BoyuLi4 , jakiuncle , Bowen Li , huanccwang , gitchenjh , DamonXue , Wu Daifu , Jiageng , nuo-promise , Guocheng Tang , likeguo , Sixh-PrFor , throwable , renzhuyan , wangteng , qinghai777 , zly123987123 , 奕仁 , 尔等同学 , qifanyyy , Jairo , ousinka
关于Apache ShenYu
Apache ShenYu 一款使用 Java Reactor 开发的响应式API 网关。以其高性能,动态灵活的流量管控,热插拔,易部署等特性,开箱即用为用户提供整套全生命周期的 API网关,包含 API注册、服务代理、协议转换与 API治理等功能。于2022年7月毕业成为Apache顶级项目。
官网: https://shenyu.apache.org GitHub: https://github.com/apache/shenyu
成为贡献者
我们欢迎每一位贡献者的加入!
贡献者指南请参考:
https://shenyu.apache.org/zh/community/contributor-guide