编写json文件
{ "service":{ "id": "hello", "name": "hello", "address": "127.0.0.1", "port": 8080, "tags": ["uth","report"], "checks":[ { "tcp": "127.0.0.1:8080", "interval": "10s" } ] } }
运行单机注册服务
consul agent -server -dev -ui -client 0.0.0.0 -config-dir=~\go\consul_conf
本文来自博客园,作者:topass123,转载请注明原文链接:https://www.cnblogs.com/topass123/p/16993018.html