I have Spring web application. I would like to put some common piece of code which will be executed at the beginning of each HTTP request so that I can check for spams. I have configured DispatcherServlet in my web.xml which means DispatcherServlet is the first entry point for every HTTP request. My question is does DispatcherServlet provide any method which will be executed first and then the control passes onto the requested annotation controller?
I have Spring web application. I would like to put some common piece of
Share
IMO this kind of functionality would belong in a
HandlerInterceptor(ref docs).