Basically, using Spring MVC, I'm trying to create a router controller that will take any URL that hasn't already been handled by another controller and route it to its respective resource or forward a search request if no resource could be found.
Using @RequestMapping(value="/{qry}", method = RequestMethod.GET) was successful in grabbing requests that weren't grabbed already by my other controllers (this seems to work by checking the most specific mappings first) and then I could do whatever forwarding I needed. However, as soon as I put a "/" in the request, the mapping breaks and returns a 404.
So in other words, "/some-long-path-or-something" maps correctly to this catch-all controller, but "/some/other/path" (which does not map to any other controller) is not caught by my catch-all.
How can this be implemented? I've read a few things about interceptors and default handlers, but with no luck in finding a solution.
Thanks for any suggestions!