Skip to content

consul not have /v1/events interface #945

@ShulicTian

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions