spring-projects / spring-projects/spring-hateoas

Enable Hateoas in project with servicenames (Kubernetes, Consul, Eureka, ...)

Open
#1,289 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: configuration process: waiting for feedback type: new feature unlikely
Dominant language
Java
Stars
1.1k
Forks
476
PR merge metrics
No merged PRs in 30d

Description

Following up to #107
To be able to create links for a service based on it's servicename, which is used especially in Microservice environments that use consul, eureka or even kubernetes, you wouldn't want to create links pointing to the instance of the service, instead you need to create links pointing to the servicename, so any instance of the service can process further requests.

The current workaround is to create a filter that fakes X-Forwarding-host headers to trick another filter to create the right settings. This seems to be very hacky and hard to understand and maintain in the long run, as it's not very obvious.

It would be much better to have a dedicated setting that overrides the port/protocol and hostname. The most flexible solution would be a class that can be provided for that, but I'm not sure if that is overkill.

I'm also not completely sure if that mechanism shouldn't be in spring itself.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review issue #107 and the current filter-based workaround involving X-Forwarded-Host headers. Determine where Spring HATEOAS builds service links and whether a configurable protocol, host, and port mechanism belongs in this project; done requires an agreed design and behavior for service-name-based links in microservice environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.