编写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
标签:文件,127.0,服务,0.1,0.0,consul,注册,8080,hello From: https://www.cnblogs.com/topass123/p/16993018.html