您现在的位置是:首页 > 文章详情

zlt-mp v6.0.0 发布,基于 Spring Cloud Alibaba 的微服务平台

日期:2023-12-18点击:57

更新内容

特性 / 增强

  • 授权服务升级为Spring Authorization Server

  • 升级到jdk17

  • 升级Swagger为OpenAPI3

  • 升级spring-boot到3.1.6

  • 升级spring-cloud到2022.0.4

  • 升级spring-cloud-alibaba到2022.0.0.0

  • 升级spring-boot-admin到3.1.8

  • 升级mybatis-plus到3.5.4.1

  • 删除txlcn-demo工程(由于txlcn不推荐使用了)

  • 删除无用模块(job和transaction)

 

特性 / 增强

分支名 JDK Spring Boot Spring Cloud
master 17 3.x 2022.x
5.x 1.8 2.5.x 2020.x
4.x 1.8 2.3.x 2.2.x

 

特旧版本升级

由旧版本升级到 v6.0.0 需要执行以下语句:

 Use `oauth-center`; alter table oauth_client_details add token_format varchar(20) not null DEFAULT 'reference' COMMENT 'token格式: reference 引用令牌(不透明), self-contained 自包含令牌(jwt))'; alter table oauth_client_details drop column support_id_token; alter table oauth_client_details drop column id_token_validity; UPDATE oauth_client_details set scope = 'app,openid,profile' where client_id = 'webApp'; UPDATE oauth_client_details set scope = 'all,openid,profile' where client_id = 'zlt';

 

内容说明

一、Spring Authorization Server

由于 Spring Security OAuth 停止维护,目前最新版本的 Spring 生态中的 OAuth2 授权服务器已替换为 Spring Authorization Server 并已可以正式生产使用;

zlt-uaa 工程已替换为 Spring Authorization Server 并基本保留原有的功能和接口。

1.1. 主要接口

  • token授权:/oauth/token

  • token校验:/oauth/check_token

  • OIDC:授权时的scope参数包含openid

  • OIDC用户端点:/userinfo

1.2. 令牌类型配置

应用管理功能中增加了 令牌类型 的配置,默认为 引用令牌 也就是生成的 access_token 值为一串随机字符串(不透明),需要通过外部的依赖来进行鉴权,如 Redis、MySQL 之类的。

当改为 自包含令牌 后,则 access_token 的格式变更为 JWT

 

二、Swagger升级为OpenAPI3

已在 gateway 中做了文档聚合,输入地址 http://localhost:9900/doc.html 即可访问所有服务的文档:

代码的注解有以下变化:

  • @Api 变更为 @Tag

  • @ApiOperation 变更为 @Operation

 

三、升级Spring Boot为3.x

配置自动加载 Configuration 的方式由原来的 META-INF\spring.factories

需更改为 META-INF\spring\org.springframework.boot.autoconfigure.AutoConfiguration.imports

 

项目地址

Gitee 地址: https://gitee.com/zlt2000/microservices-platform

Github 地址: https://github.com/zlt2000/microservices-platform

项目文档

https://www.kancloud.cn/zlt2000/microservices-platform/919417

项目更新日志

https://www.kancloud.cn/zlt2000/microservices-platform/93623

原文链接:https://www.oschina.net/news/271482/zlt-mp-6-0-0-released
关注公众号

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。

持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。

文章评论

共有0条评论来说两句吧...

文章二维码

扫描即可查看该文章

点击排行

推荐阅读

最新文章