-
Notifications
You must be signed in to change notification settings - Fork 37.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to exclude HandlerInterceptor from specific path with <mvc:interceptor> [SPR-6570] #11236
Comments
R. A. commented In my app case I don't know how to restrict interceptor to a path, because it has to load a menu for every webpage, except "/admin/" pages , "/image/..." and some other url's, so menuInterceptor itself has to filter request paths for strings like "/admin" or "/image" and cancel if finds.
Excluding some paths from intercepting seems like no less likely case than asigning them to certain paths. |
Ashish Jain commented Going through, 3.0 reference, this provides a way, to apply to certain mappings. <mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/secure/*"/>
<bean class="org.example.SecurityInterceptor" />
</mvc:interceptor>
</mvc:interceptors> |
Ken McCracken commented I agree with R.A.'s sentiment, path exclusion should be a first-class/standard feature of mapping. |
Jason Sheedy commented Agreed .. I've wasted a lot of time trying to exclude paths. This would be a REALLY helpful feature. |
Carlo Sciolla commented Not having exclusion patterns makes it quite cumbersome to use the mvc:interceptors syntax in bigger applications, please consider fixing this issue (which has started aging) |
Rossen Stoyanchev commented I've added an |
Japan Trivedi commented Perfect (y). This is what I was looking for. Thanks. :) |
Adrian Ber commented I think the same should be implemented for |
R. A. opened SPR-6570 and commented
mvc:interceptor should have a path parameter to exclude path from intercepting. For example: Interceptor runs for all paths /* , but it must not intercept specified paths: /admin/ *. /image/ * and /styles/ *
Affects: 3.0 GA
Issue Links:
Referenced from: commits 92759ed
24 votes, 25 watchers
The text was updated successfully, but these errors were encountered: