Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 771 Bytes

zookeeper-config.md

File metadata and controls

26 lines (20 loc) · 771 Bytes

Zookeeper 分布式配置

安装 SmartSql.ZooKeeperConfig

Install-Package SmartSql.ZooKeeperConfig

Demo

            string connStr = "192.168.31.103:2181";
            var configLoader = new ZooKeeperConfigLoader(connStr);
            string configPath = "/Config/App1/SmartSqlMapConfig.xml";
            var sqlMapper = new SmartSqlMapper(configPath, configLoader);
            var list = sqlMapper.Query<T_Test>(new RequestContext
            {
                Scope = "T_Test",
                SqlId = "GetList",
                Request = new { Ids = new long[] { 1, 2, 3, 4 } }
            });

工具使用 ZooKeeper-Admin

ZooKeeper-Admin