Start and end of web request lifecycle in Spring MVC
I would like to track and print some diagnostic information (when starting debug) when the web request starts and when it ends. Are there any events / listener / callback that I can register to listen for the web request lifecycle events?
To make it more specific, one of the things (not the only one) I want to do is track how long it took to process the request.
+3
source to share
1 answer
If you are using Tomcat as your server, you can try its Dumper Request filter:
http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#Request_Dumper_Filter
Otherwise, you can try HandlerInterceptor in Spring Spring HandlerInterceptor vs Servlet Filters
+1
source to share