From 3a1b270cb3e40ed3fbb77d99360a981d02b686c2 Mon Sep 17 00:00:00 2001 From: YuLuo <1481556636@qq.com> Date: Wed, 10 Jan 2024 14:23:05 +0800 Subject: [PATCH] feat: update seata version to 2.0.0 in 2023.x (#3584) * feat: update seata version to 2.0.0 in 2023.x * fix: update db passwd --- spring-cloud-alibaba-dependencies/pom.xml | 2 +- .../seata-example/readme-zh.md | 12 ++++++------ .../seata-example/readme.md | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/spring-cloud-alibaba-dependencies/pom.xml b/spring-cloud-alibaba-dependencies/pom.xml index e07e8aa865..06bbccb462 100644 --- a/spring-cloud-alibaba-dependencies/pom.xml +++ b/spring-cloud-alibaba-dependencies/pom.xml @@ -20,7 +20,7 @@ 2023.0.0.0 1.8.6 - 1.8.0 + 2.0.0 2.2.3 1.0.11 diff --git a/spring-cloud-alibaba-examples/seata-example/readme-zh.md b/spring-cloud-alibaba-examples/seata-example/readme-zh.md index 5e0fd45f43..c0913df638 100644 --- a/spring-cloud-alibaba-examples/seata-example/readme-zh.md +++ b/spring-cloud-alibaba-examples/seata-example/readme-zh.md @@ -49,7 +49,7 @@ CREATE TABLE `undo_log` ( ``` #### 导入 seata-server db 模式所需要的数据库表 -在数据库中初始化[global_table、branch_table、lock_table、distributed_lock](https://github.com/seata/seata/blob/1.8.0/script/server/db/mysql.sql) +在数据库中初始化[global_table、branch_table、lock_table、distributed_lock](https://github.com/seata/seata/blob/2.0.0/script/server/db/mysql.sql) ```sql -- -------------------------------- The script used when storeMode is 'db' -------------------------------- @@ -164,7 +164,7 @@ CREATE TABLE `account_tbl` ( > Spring Cloud Alibaba 适配了 Nacos 2.2.3 版本,在本示例中,使用 Nacos 2.2.3 作为 Seata 的配置中心组件。 -创建 Seata 的 Nacos 配置: data-id: `seata.properties` , Group: `SEATA_GROUP` (seata 1.8.0 默认分组) ,导入 [Seata Config](https://github.com/seata/seata/blob/1.8.0/script/config-center/config.txt) +创建 Seata 的 Nacos 配置: data-id: `seata.properties` , Group: `SEATA_GROUP` (seata 2.0.0 默认分组) ,导入 [Seata Config](https://github.com/seata/seata/blob/2.0.0/script/config-center/config.txt) 在 `seata.properties` 配置文件中增加应用示例中需要的以下配置项:[事务群组配置](https://seata.io/zh-cn/docs/user/configurations.html) @@ -181,11 +181,11 @@ CREATE TABLE `account_tbl` ( #### 1. 下载 -点击下载 [Seata 1.8.0](https://github.com/seata/seata/releases/download/v1.8.0/seata-server-1.8.0.zip) 版本。 +点击下载 [Seata 2.0.0](https://github.com/seata/seata/releases/download/v2.0.0/seata-server-2.0.0.zip) 版本。 #### 2. 配置 Seata-server -修改 `seata-server-1.8.0\conf\application.yml` 配置文件中的以下配置项: +修改 `seata-server-2.0.0\conf\application.yml` 配置文件中的以下配置项: - 注释 `group: SEATA_GROUP` - 添加 Nacos 用户名和密码 @@ -220,7 +220,7 @@ seata: ``` > **注意:** -> Nacos 2.2.3 开启鉴权,需要配置 `username` 和 `password` 属性,否则登陆失败。更多 Nacos 2.2.3 版本相关配置,参考 `nacos-example`。 +> Nacos 2.3.0 开启鉴权,需要配置 `username` 和 `password` 属性,否则登陆失败。更多 Nacos 2.3.0 版本相关配置,参考 `nacos-example`。 > **Seata-server 启动时的 Nacos 服务注册分组需要和示例应用中的分组保持一致,否则出现无法找到 seata-server 的错误!** > 更多 Seata-server 以 Nacos 作为配置中心的配置请参考:https://seata.io/zh-cn/docs/ops/deploy-by-docker-compose/#nacos-db @@ -240,7 +240,7 @@ sh seata-server.sh 更多配置启动参数请参考:https://seata.io/zh-cn/docs/user/quickstart/#%E6%AD%A5%E9%AA%A4-4-%E5%90%AF%E5%8A%A8%E6%9C%8D%E5%8A%A1 -**注意** 如果你修改了endpoint且注册中心使用默认file类型,那么记得需要在各个示例工程中的 `file.conf` 文件中,修改 grouplist 的值(当registry.conf 中registry.type 或 config.type 为file 时会读取内部的file节点中的文件名,若type不为file将直接从配置类型的对应元数据的注册配置中心读取数据),推荐大家使用 nacos 作为配置注册中心。 +**注意** 如果你修改了 endpoint 且注册中心使用默认 file 类型,那么记得需要在各个示例工程中的 `file.conf` 文件中,修改 grouplist 的值(当 registry.conf 中 registry.type 或 config.type 为 file 时会读取内部的 file 节点中的文件名,若 type 不为 file 将直接从配置类型的对应元数据的注册配置中心读取数据),推荐大家使用 nacos 作为配置注册中心。 ## 运行示例 diff --git a/spring-cloud-alibaba-examples/seata-example/readme.md b/spring-cloud-alibaba-examples/seata-example/readme.md index 6deaf2dd04..d3bf3a0f44 100644 --- a/spring-cloud-alibaba-examples/seata-example/readme.md +++ b/spring-cloud-alibaba-examples/seata-example/readme.md @@ -49,7 +49,7 @@ CREATE TABLE `undo_log` ( ``` #### Import the database tables required by the seata-server db schema -Initializing [global_table、branch_table、lock_table、distributed_lock](https://github.com/seata/seata/blob/1.8.0/script/server/db/mysql.sql) in the database +Initializing [global_table、branch_table、lock_table、distributed_lock](https://github.com/seata/seata/blob/2.0.0/script/server/db/mysql.sql) in the database ```sql -- -------------------------------- The script used when storeMode is 'db' -------------------------------- @@ -162,9 +162,9 @@ CREATE TABLE `account_tbl` ( ### 2. Configure Nacos -> Spring Cloud Alibaba is adapted with Nacos 2.2.3. In this example, Nacos 2.2.3 is used as the configuration center component of Seata. +> Spring Cloud Alibaba is adapted with Nacos 2.3.0. In this example, Nacos 2.3.0 is used as the configuration center component of Seata. -Create Nacos configuration for Seata: data-id: `seata.properties`, Group: `SEATA_GROUP` (default grouping for seata 1.8.0), import +Create Nacos configuration for Seata: data-id: `seata.properties`, Group: `SEATA_GROUP` (default grouping for seata 2.0.0), import Add the following configuration items required in the application example to the `seata.properties` configuration file: [事务群组配置](https://seata.io/zh-cn/docs/user/configurations.html) @@ -181,11 +181,11 @@ Add the following configuration items required in the application example to the #### 1. Download -Click Download [Seata 1.8.0](https://github.com/seata/seata/releases/download/v1.8.0/seata-server-1.8.0.zip) Version. +Click Download [Seata 2.0.0](https://github.com/seata/seata/releases/download/v2.0.0/seata-server-2.0.0.zip) Version. #### 2. Configure Seata-server -Modify `seata-server-1.8.0\conf\application.yml` the following configuration items in the configuration file: +Modify `seata-server-2.0.0\conf\application.yml` the following configuration items in the configuration file: - Comment `group: SEATA_GROUP` - Add Nacos username and password @@ -220,7 +220,7 @@ seata: ``` > **Notice** -> Nacos 2.2.3 enables authentication. Configuration `username` and `password` properties are required, otherwise login fails. For more Nacos 2.2.3 related configurations, refer to `nacos-example`. +> Nacos 2.3.0 enables authentication. Configuration `username` and `password` properties are required, otherwise login fails. For more Nacos 2.3.0 related configurations, refer to `nacos-example`. > **The Nacos service registration group when seata-server is started must be consistent with the group in the sample application, otherwise an error that seata-server cannot be found will occur!** > For more information about the configuration of Seata-server with Nacos as the configuration center, please refer to https://seata.io/zh-cn/docs/ops/deploy-by-docker-compose/#nacos-db.