-
Notifications
You must be signed in to change notification settings - Fork 539
Description
Describe the bug
version is 5.0.0
source: org.springframework.cloud.consul.ConsulClient
consul not have /v1/events interface, if you start spring cloud consul bus, you will get an error message.
as follows:
After debugging, it was found that the error was caused by DefaultRestClient's inability to parse text/plan. Because Consul did not have /v1/events, it did not return application/json as expected.
Solution
I tried inheriting from ConsulClient and overriding events, but the chain reaction of auto-injection is giving me a headache. Also, ConsulClient performs some initialization operations during creation. The only solution I can currently find is to replace DefaultRestClient with a client that can parse text/plain.
Does anyone have a better solution?