I have a java.net.URL object in a Spring 4 @RestController. How can I check if the URL (HTTP) leads to the current machine (this Spring application) or is an URL to an external HTTP-Source?
- I found out that java.net.URL does hostname resolution to compare to other URL object. Is there a way to reuse this resolution to not having to reinvent the wheel?