老师 您好!如题
控制台打印
Connected to the target VM, address: '127.0.0.1:54687', transport: 'socket'
三月 25, 2019 11:46:32 下午 com.github.shyiko.mysql.binlog.BinaryLogClient connect
信息: Connected to 127.0.0.1:3306 at mysql-bin.000027/1020 (sid:65535, cid:71)
以下是代码:
package com.imooc.ad.service;
import com.github.shyiko.mysql.binlog.BinaryLogClient;
import com.github.shyiko.mysql.binlog.event.*;
import lombok.extern.slf4j.Slf4j;
/**
* @Author Alex
* @Desc
*
*
* 测试监听binlog的开源组件
*
*
* @Date 2019/3/25 22:22
*/
@Slf4j
public class BinlogServiceTest {
public static void main(String[] args) throws Exception{
BinaryLogClient client = new BinaryLogClient(
"127.0.0.1",
3306,