Skip to content

consul not have /v1/events interface #945

Description

@ShulicTian

Describe the bug
version is 5.0.0
source: org.springframework.cloud.consul.ConsulClient

Image Image

consul not have /v1/events interface, if you start spring cloud consul bus, you will get an error message.
as follows:

Image Image Image

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status
      Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions