Allow use of MvcUriComponentsBuilder independent of Servlet request lifecycle [SPR-12800] #17397
It is a common requirement to generate links to controllers outside of an HttpServletRequest when generating E-Mails etc. Therefore it would be nice to have a way to create links which uses a configurable baseURI for the link generation instead of the request context path like this:
Referenced from: commits febcd0c
Rossen Stoyanchev commented
This is very closely related to #17218 which comes from a different angle (i.e. inserting a custom path prefix for the locale of a request) but ultimately comes down to customizing the use of ServletUriComponentsBuilder.fromCurrentServletMapping() within MvcUriComponentsBuilder.