I am using spring boot version 1.3.3. With the embedded tomcat.
For each web requests I would like to know how intercept a web request and do some custom code then continue on with the request.
My hunch is that I would override some default servlet bean or method? I don't know much about this.
So to make the question specific. For every web request how would I do the following code
@Override
public void someGenericWebParentRequest(Servlet servletRequest){
log.info("custom log called");
MDC.put("host-name", System.getenv("HOSTNAME")); // kibana hostname filter added
// whatever code you fancy etc :-)
return servletRequest; // continues onto web target controller
}