-
Notifications
You must be signed in to change notification settings - Fork 622
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
135 additions
and
18 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
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 |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# v4.2.0版本-2023/07/31 | ||
|
||
大家好,Knife4j v4.2.0版本发版,本次版本发版主要解决两个问题: | ||
|
||
|
||
## 更新日志 | ||
|
||
### 依赖升级 | ||
|
||
1、升级boot3版本为3.0.7、springdoc版本‣ | ||
|
||
2、springdoc版本升级,主要包括: | ||
|
||
- 针对Spring Boot2版本的,升级springdoc版本到1.7.0 | ||
- 针对Spring Boot3版本的,升级springdoc版本到2.1.0 | ||
|
||
|
||
### 优化`knife4j-gateway`组件 | ||
|
||
1、针对服务发现模式(`discover`),可以动态读取服务转发路由配置前缀prefix,开发者可不用在独立配置,感谢[当幸福碰错了头](https://gitee.com/chenshifeng001)PR | ||
|
||
2、支持除`default`默认分组外的多分组类型,感谢[谢进伟](https://gitee.com/xiejinwei)PR | ||
|
||
3、针对在Dubbo场景下会出现聚合各个Service的场景,该版本提供自动排除服务的扩展SPI接口,开发者可集成自动扩展实现规则进行聚合服务的排除,参考[Gitee#I6YLMB](https://gitee.com/xiaoym/knife4j/issues/I6YLMB) | ||
|
||
```javascript | ||
@Slf4j | ||
@Component | ||
public class MyExcludeService implements GatewayServiceExcludeService { | ||
@Override | ||
public Set<String> exclude(Environment environment, Knife4jGatewayProperties properties, List<String> services) { | ||
log.info("自定义过滤器."); | ||
if (!CollectionUtils.isEmpty(services)){ | ||
// 排除注册中心包含order字眼的服务 | ||
return services.stream().filter(s -> s.contains("order")).collect(Collectors.toSet()); | ||
} | ||
return new TreeSet<>(); | ||
} | ||
} | ||
``` | ||
|
||
4、解决在Nginx等二级代理转发情况下的路径错误问题[Gitee#gitee](https://gitee.com/xiaoym/knife4j/issues/I73AOG)、[GitHub#609](https://github.com/xiaoymin/knife4j/issues/609)、[Gitee#I6KYUJ][https://gitee.com/xiaoym/knife4j/issues/I6KYUJ]、[GitHub#603](https://github.com/xiaoymin/knife4j/issues/603)、[GitHub#586](https://github.com/xiaoymin/knife4j/issues/586) | ||
|
||
5、增加对子服务的排序规则设置,配置如下: | ||
|
||
```yaml | ||
knife4j: | ||
gateway: | ||
tags-sorter: alpha # 接口排序规则 | ||
operations-sorter: alpha | ||
``` | ||
不管是tag还是operation,排序规则主要提供两种实现方式: | ||
- alpha:官方swagger-ui的默认排序规则实现。 | ||
- order:*nife4j提供的增强排序规则,开发者可在子服务中扩展x-order,根据数值来自定义排序* | ||
6、knife4j-gateway组件增加basic验证GitHub#555 | ||
### Ui更新 | ||
1、Script脚本生成的TypeScript代码增加注释[Gitee#I6T78E](https://gitee.com/xiaoym/knife4j/issues/I6T78E)、[GitHub#568](https://github.com/xiaoymin/knife4j/issues/568) | ||
2、OAS2新增allof特性的支持[Github#PR589](https://github.com/xiaoymin/knife4j/pull/589) | ||
3、针对`jakarta`环境中Basic的属性提示已经match优化[GitHub#578](https://github.com/xiaoymin/knife4j/issues/578) | ||
|
||
### 增强部分 | ||
|
||
1、openapi3规范中增加对`@ApiSupport`增强注解的支持[Gitee#I79WIJ](https://gitee.com/xiaoym/knife4j/issues/I79WIJ) | ||
|
||
2、Post发送请求query的方式修改[Gitee#I7DNRP](https://gitee.com/xiaoym/knife4j/issues/I7DNRP) | ||
|
||
3、优化基础jar包的引用关系,lombok、slf4j等jar包级别改为`provided`[GitHub#591](https://github.com/xiaoymin/knife4j/issues/591) | ||
|
||
|
||
## 感谢 | ||
|
||
非常感谢以下开发者的PR贡献(排名不分先后): | ||
|
||
- [当幸福碰错了头](https://gitee.com/chenshifeng001) | ||
- [谢进伟](https://gitee.com/xiejinwei) | ||
- [最怕的、其实是孤单。。。](https://gitee.com/sky-0914) | ||
- [fengshi20102010](https://gitee.com/fengshi20102010) | ||
- [zskzskabcd](https://github.com/zskzskabcd) | ||
- [小魏,小魏,我们要去哪里呀](https://github.com/galaxy-sea) | ||
- [Pastors](https://github.com/Pastor0370) | ||
- [King-Run](https://github.com/King-Run) | ||
- [liuyd-cc](https://github.com/liuyd-cc) |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.