Эх сурвалжийг харах

day11
重建布隆过滤器;Canal客户端解决一致性问题

it_lv 1 долоо хоног өмнө
parent
commit
4d1c190c27

+ 0 - 28
service/canal-client-service/pom.xml

@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>service</artifactId>
-        <groupId>com.atguigu.tingshu</groupId>
-        <version>1.0</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>canal-client-service</artifactId>
-
-    <properties>
-        <maven.compiler.source>17</maven.compiler.source>
-        <maven.compiler.target>17</maven.compiler.target>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>io.github.xizixuejie</groupId>
-            <artifactId>canal-spring-boot-starter</artifactId>
-            <version>0.0.17</version>
-        </dependency>
-    </dependencies>
-
-</project>

+ 0 - 19
service/canal-client-service/src/main/java/com/atguigu/tingshu/CanalClientApp.java

@@ -1,19 +0,0 @@
-package com.atguigu.tingshu;
-
-import io.xzxj.canal.spring.annotation.EnableCanalListener;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-
-/**
- * @author: atguigu
- * @create: 2025-03-21 15:46
- */
-@EnableCanalListener
-@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
-public class CanalClientApp {
-
-    public static void main(String[] args) {
-        SpringApplication.run(CanalClientApp.class, args);
-    }
-}

+ 0 - 23
service/canal-client-service/src/main/java/com/atguigu/tingshu/listener/UserListener.java

@@ -1,23 +0,0 @@
-package com.atguigu.tingshu.listener;
-
-import com.atguigu.tingshu.model.CDCEntity;
-import io.xzxj.canal.core.annotation.CanalListener;
-import io.xzxj.canal.core.listener.EntryListener;
-import lombok.extern.slf4j.Slf4j;
-
-import java.util.Set;
-
-/**
- * @author: atguigu
- * @create: 2025-03-21 15:47
- */
-@Slf4j
-@CanalListener(destination = "tingshuTopic", schemaName = "tingshu_user", tableName = "user_info")
-public class UserListener implements EntryListener<CDCEntity> {
-
-    @Override
-    public void update(CDCEntity before, CDCEntity after, Set<String> fields) {
-        log.info("[cdc]监听到变更数据");
-        EntryListener.super.update(before, after, fields);
-    }
-}

+ 0 - 21
service/canal-client-service/src/main/java/com/atguigu/tingshu/model/CDCEntity.java

@@ -1,21 +0,0 @@
-package com.atguigu.tingshu.model;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import javax.persistence.Column;
-import javax.persistence.Table;
-
-/**
- *
- * @author: atguigu
- * @create: 2023-11-01 16:22
- */
-@Data
-@TableName("user_info")
-@Table(name = "user_info")
-public class CDCEntity {
-
-    @Column(name = "id")
-    private Long id;
-}

+ 0 - 8
service/canal-client-service/src/main/resources/bootstrap.properties

@@ -1,8 +0,0 @@
-spring.application.name=service-canal
-spring.profiles.active=dev
-spring.main.allow-bean-definition-overriding=true
-spring.cloud.nacos.discovery.server-addr=192.168.200.6:8848
-spring.cloud.nacos.config.server-addr=192.168.200.6:8848
-spring.cloud.nacos.config.prefix=${spring.application.name}
-spring.cloud.nacos.config.file-extension=yaml
-spring.cloud.nacos.config.shared-configs[0].data-id=common.yaml

+ 0 - 1
service/pom.xml

@@ -20,7 +20,6 @@
         <module>service-order</module>
         <module>service-payment</module>
         <module>service-user</module>
-        <module>canal-client-service</module>
         <module>service-cdc</module>
     </modules>