diff --git a/pom.xml b/pom.xml
index 6fc392b59..e84ab6e42 100644
--- a/pom.xml
+++ b/pom.xml
@@ -86,7 +86,7 @@
2023.0.3
- 3.2.7
+ 3.2.9
3.8.1
diff --git a/spring-cloud-alibaba-dependencies/pom.xml b/spring-cloud-alibaba-dependencies/pom.xml
index ed7e805c1..505252d7c 100644
--- a/spring-cloud-alibaba-dependencies/pom.xml
+++ b/spring-cloud-alibaba-dependencies/pom.xml
@@ -20,8 +20,8 @@
2023.0.1.2
1.8.8
- 2.3.2
- 2.0.0
+ 2.4.2
+ 2.1.0
5.1.4
@@ -35,7 +35,7 @@
3.2.1
- 3.1.1
+ 3.2.0
3.0.1
1.2.7
@@ -169,10 +169,9 @@
sentinel-spring-webmvc-v6x-adapter
${sentinel.version}
-
-
+
- io.seata
+ org.apache.seata
seata-spring-boot-starter
${seata.version}
diff --git a/spring-cloud-alibaba-examples/integrated-example/docker-compose/docker-compose-env.yml b/spring-cloud-alibaba-examples/integrated-example/docker-compose/docker-compose-env.yml
index 494e28e9d..a6d39261d 100644
--- a/spring-cloud-alibaba-examples/integrated-example/docker-compose/docker-compose-env.yml
+++ b/spring-cloud-alibaba-examples/integrated-example/docker-compose/docker-compose-env.yml
@@ -3,7 +3,7 @@ services:
# nacos
nacos:
- image: nacos/nacos-server:v2.1.0
+ image: nacos/nacos-server:v2.4.2
hostname: nacos-server
restart: always
container_name: integrated-example-nacos
diff --git a/spring-cloud-alibaba-examples/nacos-example/readme-zh.md b/spring-cloud-alibaba-examples/nacos-example/readme-zh.md
index 7fc6d3c87..ad818b09f 100644
--- a/spring-cloud-alibaba-examples/nacos-example/readme-zh.md
+++ b/spring-cloud-alibaba-examples/nacos-example/readme-zh.md
@@ -6,26 +6,26 @@
[Nacos](https://github.com/alibaba/Nacos) 是阿里巴巴开源的一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台。
-## 正确配置并启动 Nacos Server 2.3.2
+## 正确配置并启动 Nacos Server 2.4.2
-在 Nacos 2.3.2 中,加入了用户鉴权相关的功能,在首次启动 Nacos Server 时,需要正确配置,避免出现启动失败的问题。
+在 Nacos 2.4.2 中,加入了用户鉴权相关的功能,在首次启动 Nacos Server 时,需要正确配置,避免出现启动失败的问题。
### 下载 Nacos Server
-> 本示例中使用 Nacos Server 版本为 2.3.2!
+> 本示例中使用 Nacos Server 版本为 2.4.2!
-Nacos 支持直接下载和源码构建两种方式。**推荐在 Spring Cloud Alibaba 2023.x 中使用 Nacos Server 2.3.2 版本。**
+Nacos 支持直接下载和源码构建两种方式。**推荐在 Spring Cloud Alibaba 2023.x 中使用 Nacos Server 2.4.2 版本。**
1. 直接下载:[Nacos Server 下载页](https://github.com/alibaba/nacos/releases)
2. 源码构建:进入 Nacos [Github 项目页面](https://github.com/alibaba/nacos),将代码 git clone 到本地自行编译打包,[参考文档](https://nacos.io/zh-cn/docs/quick-start.html)。
### 配置 Nacos Server
-打开 `\nacos-server-2.3.2\conf\application.properties` 配置文件,修改以下配置项:
+打开 `\nacos-server-2.4.2\conf\application.properties` 配置文件,修改以下配置项:
#### 配置数据源
-此处以 MySQL 数据库为例,使用 `nacos-server-2.3.2\conf\mysql-schema.sql` 初始化数据库表文件。同时修改以下配置
+此处以 MySQL 数据库为例,使用 `nacos-server-2.4.2\conf\mysql-schema.sql` 初始化数据库表文件。同时修改以下配置
```properties
#*************** Config Module Related Configurations ***************#
@@ -49,7 +49,7 @@ db.pool.config.minimumIdle=2
#### 开启鉴权
-**注意:不开启在 2.3.2 中会出现登陆失败异常!**
+**注意:不开启在 2.4.2 中会出现登陆失败异常!**
```properties
### The auth system to use, currently only 'nacos' and 'ldap' is supported:
@@ -77,7 +77,7 @@ nacos.core.auth.plugin.nacos.token.secret.key=SecretKey0123456789012345678901234
#### Open API 鉴权
-在 nacos server 2.3.2 中使用 Open api 接口时需要鉴权:更多细节请参考:[Nacos api 鉴权](https://nacos.io/zh-cn/docs/auth.html)
+在 nacos server 2.4.2 中使用 Open api 接口时需要鉴权:更多细节请参考:[Nacos api 鉴权](https://nacos.io/zh-cn/docs/auth.html)
1. 获取 accessToken:使用用户名和密码登陆 nacos server:
diff --git a/spring-cloud-alibaba-examples/nacos-example/readme.md b/spring-cloud-alibaba-examples/nacos-example/readme.md
index 9f9d471de..c5996a734 100644
--- a/spring-cloud-alibaba-examples/nacos-example/readme.md
+++ b/spring-cloud-alibaba-examples/nacos-example/readme.md
@@ -6,9 +6,9 @@ This project demonstrates how to use Spring Cloud Alibaba Nacos related Starters
[Nacos](https://github.com/alibaba/Nacos) It is Alibaba's open source dynamic service discovery, configuration management and service management platform that is easier to build cloud-native applications.
-## Nacos Server 2.3.2 is properly configured and started
+## Nacos Server 2.4.2 is properly configured and started
-In Nacos 2.3.2, functions related to user authentication are added. When starting Nacos Server for the first time, it needs to be configured correctly to avoid the problem of startup failure.
+In Nacos 2.4.2, functions related to user authentication are added. When starting Nacos Server for the first time, it needs to be configured correctly to avoid the problem of startup failure.
### Download Nacos Server
@@ -49,7 +49,7 @@ db.pool.config.minimumIdle=2
#### Turn on authentication
-**Note: If it is not enabled, login failure exception will occur in 2.3.2!**
+**Note: If it is not enabled, login failure exception will occur in 2.4.2!**
```properties
### The auth system to use, currently only 'nacos' and 'ldap' is supported:
@@ -77,7 +77,7 @@ nacos.core.auth.plugin.nacos.token.secret.key=SecretKey0123456789012345678901234
#### Open API authentication
-Authentication is required when using the Open api interface in nacos server 2.3.2: For more details, please refer to: [Nacos api authentication](https://nacos.io/zh-cn/docs/auth.html)
+Authentication is required when using the Open api interface in nacos server 2.4.2: For more details, please refer to: [Nacos api authentication](https://nacos.io/zh-cn/docs/auth.html)
1. Obtain accessToken: Use username and password to log in to the nacos server:
diff --git a/spring-cloud-alibaba-examples/seata-example/readme-zh.md b/spring-cloud-alibaba-examples/seata-example/readme-zh.md
index 9f79c45a3..6450a3a35 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/2.0.0/script/server/db/mysql.sql)
+在数据库中初始化[global_table、branch_table、lock_table、distributed_lock](https://github.com/seata/seata/blob/2.1.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 2.0.0 默认分组) ,导入 [Seata Config](https://github.com/seata/seata/blob/2.0.0/script/config-center/config.txt)
+创建 Seata 的 Nacos 配置: data-id: `seata.properties` , Group: `SEATA_GROUP` (seata 2.1.0 默认分组) ,导入 [Seata Config](https://github.com/seata/seata/blob/2.1.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 2.0.0](https://github.com/seata/seata/releases/download/v2.0.0/seata-server-2.0.0.zip) 版本。
+点击下载 [Seata 2.1.0](https://github.com/seata/seata/releases/download/v2.1.0/seata-server-2.1.0.zip) 版本。
#### 2. 配置 Seata-server
-修改 `seata-server-2.0.0\conf\application.yml` 配置文件中的以下配置项:
+修改 `seata-server-2.1.0\conf\application.yml` 配置文件中的以下配置项:
- 注释 `group: SEATA_GROUP`
- 添加 Nacos 用户名和密码
@@ -220,7 +220,7 @@ seata:
```
> **注意:**
-> Nacos 2.3.2 开启鉴权,需要配置 `username` 和 `password` 属性,否则登陆失败。更多 Nacos 2.3.2 版本相关配置,参考 `nacos-example`。
+> Nacos 2.4.2 开启鉴权,需要配置 `username` 和 `password` 属性,否则登陆失败。更多 Nacos 2.4.2 版本相关配置,参考 `nacos-example`。
> **Seata-server 启动时的 Nacos 服务注册分组需要和示例应用中的分组保持一致,否则出现无法找到 seata-server 的错误!**
> 更多 Seata-server 以 Nacos 作为配置中心的配置请参考:https://seata.io/zh-cn/docs/ops/deploy-by-docker-compose/#nacos-db
diff --git a/spring-cloud-alibaba-examples/seata-example/readme.md b/spring-cloud-alibaba-examples/seata-example/readme.md
index 8e9480601..a96d9f4f8 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/2.0.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.1.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.3.2. In this example, Nacos 2.3.2 is used as the configuration center component of Seata.
+> Spring Cloud Alibaba is adapted with Nacos 2.4.2. In this example, Nacos 2.4.2 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 2.0.0), import
+Create Nacos configuration for Seata: data-id: `seata.properties`, Group: `SEATA_GROUP` (default grouping for seata 2.1.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 2.0.0](https://github.com/seata/seata/releases/download/v2.0.0/seata-server-2.0.0.zip) Version.
+Click Download [Seata 2.1.0](https://github.com/seata/seata/releases/download/v2.1.0/seata-server-2.1.0.zip) Version.
#### 2. Configure Seata-server
-Modify `seata-server-2.0.0\conf\application.yml` the following configuration items in the configuration file:
+Modify `seata-server-2.1.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.3.2 enables authentication. Configuration `username` and `password` properties are required, otherwise login fails. For more Nacos 2.3.2 related configurations, refer to `nacos-example`.
+> Nacos 2.4.2 enables authentication. Configuration `username` and `password` properties are required, otherwise login fails. For more Nacos 2.4.2 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.
diff --git a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/test/java/com/alibaba/cloud/nacos/registry/MockNamingService.java b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/test/java/com/alibaba/cloud/nacos/registry/MockNamingService.java
index 297c7a27b..969c2759b 100644
--- a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/test/java/com/alibaba/cloud/nacos/registry/MockNamingService.java
+++ b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/test/java/com/alibaba/cloud/nacos/registry/MockNamingService.java
@@ -25,6 +25,7 @@ import com.alibaba.nacos.api.naming.listener.EventListener;
import com.alibaba.nacos.api.naming.pojo.Instance;
import com.alibaba.nacos.api.naming.pojo.ListView;
import com.alibaba.nacos.api.naming.pojo.ServiceInfo;
+import com.alibaba.nacos.api.naming.selector.NamingSelector;
import com.alibaba.nacos.api.selector.AbstractSelector;
/**
@@ -349,4 +350,24 @@ public class MockNamingService implements NamingService {
emptyListView.setData(Collections.emptyList());
return emptyListView;
}
+
+ @Override
+ public void subscribe(String s, NamingSelector namingSelector, EventListener eventListener) throws NacosException {
+
+ }
+
+ @Override
+ public void subscribe(String s, String s1, NamingSelector namingSelector, EventListener eventListener) throws NacosException {
+
+ }
+
+ @Override
+ public void unsubscribe(String s, NamingSelector namingSelector, EventListener eventListener) throws NacosException {
+
+ }
+
+ @Override
+ public void unsubscribe(String s, String s1, NamingSelector namingSelector, EventListener eventListener) throws NacosException {
+
+ }
}
diff --git a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-seata/pom.xml b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-seata/pom.xml
index 4d241c23a..04e0e4b88 100644
--- a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-seata/pom.xml
+++ b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-seata/pom.xml
@@ -40,7 +40,7 @@
- io.seata
+ org.apache.seata
seata-spring-boot-starter
diff --git a/spring-cloud-alibaba-tests/nacos-tests/nacos-config-test/src/test/resources/docker/nacos-compose-test.yml b/spring-cloud-alibaba-tests/nacos-tests/nacos-config-test/src/test/resources/docker/nacos-compose-test.yml
index c55cf2062..bddd9a5f1 100644
--- a/spring-cloud-alibaba-tests/nacos-tests/nacos-config-test/src/test/resources/docker/nacos-compose-test.yml
+++ b/spring-cloud-alibaba-tests/nacos-tests/nacos-config-test/src/test/resources/docker/nacos-compose-test.yml
@@ -1,6 +1,6 @@
services:
nacos:
- image: nacos/nacos-server:2.0.1
+ image: nacos/nacos-server:v2.4.2
container_name: nacos-standalone
environment:
- PREFER_HOST_MODE=hostname
diff --git a/spring-cloud-alibaba-tests/nacos-tests/nacos-discovery-test/src/test/resources/docker/nacos-compose-test.yml b/spring-cloud-alibaba-tests/nacos-tests/nacos-discovery-test/src/test/resources/docker/nacos-compose-test.yml
index 692aa19b6..fa7c3e0d7 100644
--- a/spring-cloud-alibaba-tests/nacos-tests/nacos-discovery-test/src/test/resources/docker/nacos-compose-test.yml
+++ b/spring-cloud-alibaba-tests/nacos-tests/nacos-discovery-test/src/test/resources/docker/nacos-compose-test.yml
@@ -1,6 +1,6 @@
services:
nacos:
- image: nacos/nacos-server:2.0.1
+ image: nacos/nacos-server:v2.4.2
container_name: nacos-standalone
environment:
- PREFER_HOST_MODE=hostname