I need to get the web server root / host URL part (and possible port). Example: https://www.example.net
I don't care about the context path or the complete URI. I know there has to be some static context set in Spring somewhere that I can access or inject this information into my service class but I cannot find it, and all I see are articles about how to set the application context.
Edit: Also, I do not want to have to pass it from the HttpRequest object.
Is there a static method from some Spring context that will return me this information?