• task


    package com.hgx.test.process;

    import com.hgx.test.common.GetProperties;

    /**
    * config file read
    * 报名
    * @author sasou <admin@php-gene.com> web:http://www.php-gene.com/
    * @version 1.0.0
    */
    public final class task {

    public static void main(String[] args) {
    // init
    new GetProperties();
    if (GetProperties.canal.destination == null) {
    System.out.println("error:canal destination is null!");
    return;
    }
    int num = GetProperties.canal.destination.length;

    if (num > 0) {
    for (int i = 0; i < num; i++) {
    System.out.println(GetProperties.canal.destination[i]);
    System.out.println(GetProperties.canal.ip);
    if (!"".equals(GetProperties.canal.destination[i])) {
    String type = GetProperties.target.get(GetProperties.canal.destination[i]).type;
    switch (type) {
    case "kafka":
    new Thread(new Kafkatest(GetProperties.canal.destination[i])).start();
    break;
    /* case "redis":
    new Thread(new Redis(GetProperties.canal.destination[i])).start();
    break;
    case "elasticsearch":
    new Thread(new ElasticSearch(GetProperties.canal.destination[i])).start();
    break;*/
    default:
    System.out.println("error:not support type!");
    break;
    }

    }
    }
    }
    }

    }
  • 相关阅读:
    Mybaits利用插件generator自动生成sql
    idea设置
    centos虚拟机的相关知识
    nginx部署
    apollo配置
    分布式报错解决方案
    搭建springconfigCenter遇到的坑
    idea中git配置
    SpringCloudDay1_概念
    03.2020 MB SD Connect C4 Software “set_SDconnect.bat” File Lost Error Solution
  • 原文地址:https://www.cnblogs.com/heguoxiu/p/10135364.html
Copyright © 2020-2023  润新知