mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
Updated ClientExample (markdown)
@@ -1,4 +1,27 @@
|
||||
<h1>ClientSample</h1>
|
||||
|
||||
<h2>直接使用canal.example工程</h2>
|
||||
|
||||
1. 首先启动Canal Server,可参见[[QuickStart]]
|
||||
2.
|
||||
<ol>
|
||||
<li>可以在eclipse里,直接打开com.alibaba.otter.canal.example.SimpleCanalClientTest,直接运行</li>
|
||||
<li>下载example包: https://github.com/alibaba/canal/tree/gh-pages/download,解压缩后,直接运行startup.sh脚本</li>
|
||||
</ol>
|
||||
就可以在控制台或者logs中看到:
|
||||
<pre class="java" name="code">
|
||||
================> binlog[mysql-bin.002579:508882822] , name[retl,xdual] , eventType : UPDATE , executeTime : 1368607728000 , delay : 4270ms
|
||||
-------> before
|
||||
ID : 1 update=false
|
||||
X : 2013-05-15 11:43:42 update=false
|
||||
-------> after
|
||||
ID : 1 update=false
|
||||
X : 2013-05-15 16:48:48 update=true</pre>
|
||||
<p> </p>
|
||||
|
||||
----
|
||||
|
||||
<h2>从头创建工程</h2>
|
||||
<p>依赖配置:</p>
|
||||
<pre name="code" class="java"><dependency>
|
||||
<groupId>com.alibaba.otter</groupId>
|
||||
|
||||
Reference in New Issue
Block a user