Exclude static resources in InterceptorRegistration in Spring MVC #32758
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: waiting-for-triage
An issue we've not yet triaged or decided on
I use the "HandlerInterceptor" to set some attributes to "request" at the invocation of each controller and check the URL parameters. I would like to easily exclude this interceptor from all static resources. For various reasons (including the migration of the application from another framework), I have static resources placed in several folders.
Currently I have to do it this way:
It would be very useful to have an
excludeStaticResources()
orexcludeResource()
method inInterceptorRegistration
, so that I don't have to repeat the list of folders with static resources.Or the
includeControllersOnly
method, which would set the Interceptor exclusively for MVC Spring controllers.The text was updated successfully, but these errors were encountered: