标签:public can efi lazy ogg false json stat update
https://github.com/aa310958153/easy-canal
//[数据库名字].[表名] @Table(name = "canal.act_activity") @Component public class ActivityCanalListener implements ProcessListener<Activity> { private static final Logger logger = LoggerFactory.getLogger(ActivityCanalListener.class); @Override public boolean update(Activity after, Activity before, List<String> updateFiled) { logger.info("-------------------------触发修改-------------------------"); logger.info("修改一条数据修改前:{}", JSON.toJSON(after)); logger.info("修改一条数据修改后:{}", JSON.toJSON(before)); logger.info("修改一条数据修改字段:{}", JSON.toJSON(updateFiled)); logger.info("-------------------------触发end-------------------------"); return false; } @Override public boolean insert(Activity activity) { logger.info("新增一条数据{}", JSON.toJSON(activity)); return false; } @Override public boolean delete(Activity activity) { logger.info("删除一条数据{}", JSON.toJSON(activity)); return false; } }
当我们再数据库进行编辑操作时马上就可以收到订阅
标签:public can efi lazy ogg false json stat update
原文地址:https://www.cnblogs.com/LQBlog/p/14582360.html