I am working on Spring MVC controller project in which I am making a GET URL call from the browser -
Below is the url by which I am making a GET call from the browse
You can get the IP address statically from the RequestContextHolder as below :
RequestContextHolder
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()) .getRequest(); String ip = request.getRemoteAddr();