赞
踩
实例注册到Consul时能够携带Metadata,这样其它实例就能够直接从Consul上获取该实例的Metadata信息。
Spring Cloud Consul官方文档是这样说的:
Consul does not yet support metadata on services. Spring Cloud’s ServiceInstance has a Map<String, String> metadata field. Spring Cloud Consul uses Consul tags to approximate metadata until Consul officially supports metadata. Tags with the form key=value will be split and used as a Map key and value respectively. Tags without the equal = sign, will be used as both the key and value.
翻译下:
注册到Consul中的服务还不支持Metadata。Spring Cloud的ServiceInstance类中包含一个名为metadata,类型为Map<String, String>。在Consul没有官方支持medata之前,Spring Cloud Consul可以用Consul的tag
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。