春节刚过,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 插件的更多使用请参考
shenyu.apache.org/zh/docs/plu…
支持Nacos不同命名空间
具体实现请参考: github.com/apache/shen…
优化 mock 插件
具体实现请参考: github.com/apache/shen…
注册中心实例支持eureka
具体实现请参考: github.com/apache/shen…
支持 API 文档
具体实现请参考: github.com/apache/shen…
添加 Sentinel 插件的规则处理参数
具体实现请参考: github.com/apache/shen…
添加 e2e 测试引擎
支持Apache ShenYu的 End to End 测试。
具体实现请参考: github.com/apache/shen…
添加 casdoor 插件支持SSO
具体使用请参考: shenyu.apache.org/zh/docs/plu…
添加 logging-tencent-cls 插件
该插件用于支持收集日志到Tencent cls日志平台,并通过Tencent cls日志平台进行数据分析。
具体使用请参考: shenyu.apache.org/zh/docs/plu…
添加 logging-clickhouse插件
具体实现请参考: github.com/apache/shen…
添加 logging-pulsar 插件
通过Pulsar收集网关http请求日志,通过其他应用消费Pulsar消息,并且对日志进行分析。
插件使用流程图
![](https://img-blog.csdnimg.cn/img_convert/253476636fbad92fb9c7abfaacedfff4.webp?x-oss-process=image/format,png)
![](https://img-blog.csdnimg.cn/img_convert/0b6b5d34390f9c0722c96b7712f27e9c.webp?x-oss-process=image/format,png)
具体使用请参考: shenyu.apache.org/zh/docs/plu…
添加 key-auth 插件
具体实现请参考: github.com/apache/shen…
增强
优化 motan 客户端注解
具体实现请参考: github.com/apache/shen…
优化motan插件配置
具体实现请参考: github.com/apache/shen…
优化 websocket 客户端注解
具体实现请参考: github.com/apache/shen…
优化 springcloud客户端注解
具体实现请参考: github.com/apache/shen…
优化 springmvc 客户端注解
具体实现请参考: github.com/apache/shen…
重构
重构 API文档的mock请求
具体实现请参考: github.com/apache/shen…
重构 logging-clickhouse 插件
具体实现请参考: github.com/apache/shen…
优化 dubbo相关maven依赖
具体实现请参考: github.com/apache/shen…
重构 sign 插件
具体实现请参考: github.com/apache/shen…
更新 ShenyuExtConfiguration
具体实现请参考: github.com/apache/shen…
移除不必要的单例
具体实现请参考: github.com/apache/shen…
修复并发场景mock数据
具体实现请参考: github.com/apache/shen…
重构 sdk 测试
具体实现请参考: github.com/apache/shen…
重构 DefaultSignService
具体实现请参考: github.com/apache/shen…
重构 shenyu-admin 规则
具体实现请参考: github.com/apache/shen…
优化 ShaUtil
具体实现请参考: github.com/apache/shen…
优化缓存
具体实现请参考: github.com/apache/shen…
修复 ConcurrentModificationException
具体实现请参考: github.com/apache/shen…
修复 etcd 数据同步
具体实现请参考: github.com/apache/shen…
重构 sdk 客户端
具体实现请参考: github.com/apache/shen…
优化请求超时
具体实现请参考: github.com/apache/shen…
重构日志模块
具体实现请参考: github.com/apache/shen…
重构 springcloud 客户端
具体实现请参考: github.com/apache/shen…
重构 Motan插件
具体实现请参考: github.com/apache/shen…
重构 admin 数据同步
具体实现请参考: github.com/apache/shen…
重构 tars 客户端
具体实现请参考: github.com/apache/shen…
重构 alibaba-dubbo 客户端
具体实现请参考: github.com/apache/shen…
重构 springmvc 客户端
具体实现请参考: github.com/apache/shen…
重构 admin 配置
具体实现请参考: github.com/apache/shen…
优化随机算法
具体实现请参考: github.com/apache/shen…
重构负载均衡算法
具体实现请参考: github.com/apache/shen…
重构 logging-kafka 插件
具体实现请参考: github.com/apache/shen…
错误修复
移除多余的 cookie 设置
具体实现请参考: github.com/apache/shen…
修复 appAuth删除逻辑
具体实现请参考: github.com/apache/shen…
修复 Cryptor-Request 插件
具体实现请参考: github.com/apache/shen…
修复 ext 插件
具体实现请参考: github.com/apache/shen…
修复升级脚本
具体实现请参考: github.com/apache/shen…
修复 Nacos 注册空指针问题
具体实现请参考: github.com/apache/shen…
修复 sandbox json 解析
具体实现请参考: github.com/apache/shen…
修复插件更新时的异常
具体实现请参考: github.com/apache/shen…
修复 postgresql 脚本
具体实现请参考: github.com/apache/shen…
修复 sentinel 插件的异常
具体实现请参考: github.com/apache/shen…
修复 TencentClsLog异常
具体实现请参考: github.com/apache/shen…
修复更新密码异常
具体实现请参考: github.com/apache/shen…
修复选择器分页异常
具体实现请参考: github.com/apache/shen…
修复 request 插件异常
具体实现请参考: github.com/apache/shen…
修复 RateLimiter插件并发处理异常
具体实现请参考: github.com/apache/shen…
修复 sign 插件异常
具体实现请参考: github.com/apache/shen…
修复 context-path 插件异常
具体实现请参考: github.com/apache/shen…