spring boot get hostname httpservletrequest code example
Example: get host from request object java
request.getRequestURL().toString().replace(request.getRequestURI(), "")
request.getRequestURL().toString().replace(request.getRequestURI(), "")