spring-cloud / spring-cloud-consul

Spring Cloud Consul
http://cloud.spring.io/spring-cloud-consul/
Apache License 2.0
808 stars 540 forks source link

'contextPath' information not added to meta field during Consul registration #755

Closed MatthiasZerau closed 1 year ago

MatthiasZerau commented 2 years ago

According to the Spring Cloud Consul documentation support for meta field is available and parsing of the tags field is deprecated and will be removed in a future version. There's also a configuration property spring.cloud.consul.discovery.tags-as-metadata which controls the behavior.

However, when the property is set to false not all auto generated meta data is written into the meta field. The property contextPath is still added as entry in tags field c.f. ConsulServletRegistrationCustomizer.

As a result I end up with a Consul service registration for my web application where some data can be found in meta and other in tags. This makes it unnecessarily complex for clients to consume those properties.

spencergibb commented 1 year ago

tags-as-metadata is no longer supported.