consul-demo.zip
Describe the bug
consul returns 301 moved permanently
spring.config.import=consul:/test
The Problem is double //
StackTrace:
26-01-12T12:06:47.569+01:00 ERROR 35132 --- [zbm-parts-service] [TaskScheduler-1] o.s.s.s.TaskUtils$LoggingErrorHandler : Unexpected error occurred in scheduled task
org.springframework.web.client.UnknownContentTypeException: Could not extract response: no suitable HttpMessageConverter found for response type [java.util.List<org.springframework.cloud.consul.model.http.kv.GetValue>] and content type [text/html;charset=utf-8]
at org.springframework.web.client.DefaultRestClient.readWithMessageConverters(DefaultRestClient.java:258) ~[spring-web-7.0.2.jar:7.0.2]
at org.springframework.web.client.DefaultRestClient$DefaultResponseSpec.readBody(DefaultRestClient.java:903) ~[spring-web-7.0.2.jar:7.0.2]
at org.springframework.web.client.DefaultRestClient$DefaultResponseSpec.lambda$toEntityInternal$0(DefaultRestClient.java:843) ~[spring-web-7.0.2.jar:7.0.2]
at org.springframework.web.client.DefaultRestClient$DefaultRequestBodyUriSpec.exchangeInternal(DefaultRestClient.java:612) ~[spring-web-7.0.2.jar:7.0.2]
at org.springframework.web.client.DefaultRestClient$DefaultRequestBodyUriSpec.exchange(DefaultRestClient.java:567) ~[spring-web-7.0.2.jar:7.0.2]
at org.springframework.web.client.RestClient$RequestHeadersSpec.exchange(RestClient.java:750) ~[spring-web-7.0.2.jar:7.0.2]
at org.springframework.web.client.DefaultRestClient$DefaultResponseSpec.executeAndExtract(DefaultRestClient.java:896) ~[spring-web-7.0.2.jar:7.0.2]
at org.springframework.web.client.DefaultRestClient$DefaultResponseSpec.toEntityInternal(DefaultRestClient.java:842) ~[spring-web-7.0.2.jar:7.0.2]
problematic rest call:
|
ResponseEntity<List<GetValue>> response = this.consul.getKVValues(context, aclToken, |
Demo project is attached
spring boot :4.0.1
consul-demo.zip
Describe the bug
consul returns 301 moved permanently
spring.config.import=consul:/testThe Problem is double //
StackTrace:
problematic rest call:
spring-cloud-consul/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConfigWatch.java
Line 159 in 00397e9
Demo project is attached
spring boot :4.0.1