I have a abstract superclass controller as below:
There is another controller which extends this class and has a request mapping specified for one of its methods:
Now the issue here is that when dispatcher
servlet redirects the request to the specific method (populateBeta in this case), i need to check for some request parameters modified in a separate interceptor class first.
So essentially i have to invoke the throwInterceptorExceptionForRedirection() method before the normal execution of populateBeta() begins.
The reason to eliminate the explicit call in the controller method is because i have multiple controllers & their mapped methods. All controllers extend the BaseController.
It would be great to have throwInterceptorExceptionForRedirection() executed before any URL mapped methods are invoked by the applicationcontext directly.
using point cuts as an option doesnt help as i need the HttpServletRequest object in throwInterceptorExceptionForRedirection().
Any suggestion/help?