In my web application, pages are dynamically mapped to urls and pages can be added and removed. Hence, I wrote my own class extending AbstractUrlHttpHandlerMapping
and all requests are routed to one handler method.
However, now I don't want resources to be treated the same way, resources should just be returned as usually. How do I achieve this? I tried returning a ResourceHttpRequestHandler
for such resources, but I am not sure what to set PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE
to. My attempts ended in an NPE.
Is there a better way to return resources while using my own handler mapping?