From 9b89e77b8e6d2109a4ef05494643e4306395c4f5 Mon Sep 17 00:00:00 2001 From: "yong.teng" Date: Mon, 20 Nov 2023 23:14:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20@CanalEventListener=20?= =?UTF-8?q?=E4=BB=85=E6=8C=87=E5=AE=9A=20schema=20=E6=88=96=20table=20?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=98=A0=E5=B0=84=E6=96=B9=E6=B3=95=E7=9A=84?= =?UTF-8?q?=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ .../canal/core/listener/utils/EventListenerUtils.java | 8 ++++++-- buession-canal-parent/pom.xml | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c93fba..eb4feab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ - [依赖库版本升级和安全漏洞修复](https://github.com/buession/buession-parent/releases/tag/v2.3.2) +### 🐞 Bug 修复 + +- **buession-canal-core:** 修复 buession-beans bean 转换导致的数据丢失的 BUG +- **buession-canal-core:** 修复 @CanalEventListener 仅指定 schema 或 table 服务映射方法的 BUG + + --- diff --git a/buession-canal-core/src/main/java/com/buession/canal/core/listener/utils/EventListenerUtils.java b/buession-canal-core/src/main/java/com/buession/canal/core/listener/utils/EventListenerUtils.java index 095130a..acc62b5 100644 --- a/buession-canal-core/src/main/java/com/buession/canal/core/listener/utils/EventListenerUtils.java +++ b/buession-canal-core/src/main/java/com/buession/canal/core/listener/utils/EventListenerUtils.java @@ -45,9 +45,13 @@ public static String buildEventListenerName(final String destination, final Stri sb.append(destination).append("$$"); if(Validate.hasText(schema) && Validate.hasText(table)){ - sb.append(schema).append('.').append(table).append("$$"); + sb.append(schema).append('.').append(table); + }else if(Validate.hasText(schema)){ + sb.append("schema:").append(schema); + }else if(Validate.hasText(table)){ + sb.append("table:").append(table); } - sb.append(eventType.name()); + sb.append("$$").append(eventType.name()); return sb.toString(); } diff --git a/buession-canal-parent/pom.xml b/buession-canal-parent/pom.xml index ae4e563..20e3ca1 100644 --- a/buession-canal-parent/pom.xml +++ b/buession-canal-parent/pom.xml @@ -61,7 +61,7 @@ - 2.3.1 + 2.3.2 1.1.7