package com.imooc.ad.mysql.listener;
import com.github.shyiko.mysql.binlog.BinaryLogClient;
import com.github.shyiko.mysql.binlog.event.*;
import com.imooc.ad.mysql.TemplateHolder;
import com.imooc.ad.mysql.dto.BinlogRowData;
import com.imooc.ad.mysql.dto.TableTemplate;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.io.Serializable;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@Component
public class AggregationListener implements BinaryLogClient.EventListener {
private String dbName;
private String tableName;
private Map<String,Ilistener> listenerMap = new HashMap<>();
private final TemplateHolder templateHolder;
@Autowired
Binlog监听与解析的实现
最新推荐文章于 2023-07-17 10:26:42 发布