How to check if client is local in Java
===

I have a server-side application running Apache Tomcat and developed with Spring. I need to prevent some users to access the application outside the local network.
I've been searching for a while, but I couldn't find a way to solve this. Does Spring provide a functionality to restrict the user internal/external access based on his permissions? 