Open
Description
There are several tickets requesting to influence the URLs that the ControllerLinkBuilder
creates. I'd like to propose another variation:
I'd like an option to have ControllerLinkBuilder
build links with a fixed, configured base URL instead of the information extracted from the servlet request. My use case is having redundant service instances that are accessed by client side load balancing from other services within the same application. I'd like to configure that base URL as an environment property, and in my case use spring.application.name
as host name as this is the service name in eureka. There's a bit more context in this Stack Overflow question.
- Consider instance-based alternative for ControllerLinkBuilder static methods #420 makes a similar request but focuses on the implementation
- ControllerLinkBuilder.linkTo throws error if called outside of the context of a HTTP request #408 and Support for relative href links? #330 propose relative links instead (which probably could be considered in a solution for this)