I am using this in a logging filter in a SpringBoot application, almost all the main threads are going in lock state due to InetAddress.getLocalHost(). What could be the possible reason and how can I fix this?
private void populateMandatoryDetailsFromRequest(final HttpServletRequest httpServletRequest)
throws UnknownHostException {
ThreadContext.put(CO_HOST_ADDRESS.value(), InetAddress.getLocalHost().getHostAddress());
ThreadContext.put(CO_REQUEST_URI.value(), httpServletRequest.getRequestURI());
}