Skip to content

Commit

Permalink
feat: update seata version to 2.0.0 in 2023.x (#3584)
Browse files Browse the repository at this point in the history
* feat: update seata version to 2.0.0 in 2023.x

* fix: update db passwd
  • Loading branch information
yuluo-yx authored Jan 10, 2024
1 parent fc7717f commit 3a1b270
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion spring-cloud-alibaba-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<properties>
<revision>2023.0.0.0</revision>
<sentinel.version>1.8.6</sentinel.version>
<seata.version>1.8.0</seata.version>
<seata.version>2.0.0</seata.version>
<nacos.client.version>2.2.3</nacos.client.version>
<spring.context.support.version>1.0.11</spring.context.support.version>
<!-- Apache RocketMQ -->
Expand Down
12 changes: 6 additions & 6 deletions spring-cloud-alibaba-examples/seata-example/readme-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' --------------------------------
Expand Down Expand Up @@ -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)

Expand All @@ -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 用户名和密码
Expand Down Expand Up @@ -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

Expand All @@ -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 作为配置注册中心。

## 运行示例

Expand Down
12 changes: 6 additions & 6 deletions spring-cloud-alibaba-examples/seata-example/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' --------------------------------
Expand Down Expand Up @@ -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)

Expand All @@ -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
Expand Down Expand Up @@ -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.

Expand Down

0 comments on commit 3a1b270

Please sign in to comment.