In my spring mvc context I have the following mappings (there is much more but this will give a general idea).
<mvc:view-controller path="/echo" view-name="echo"/>
<context:component-scan base-package="com.myapp.controllers"/>
The issue I am running into is that I have an annotated controller with @RequestMapping(value = "/e{number}". In the same controller with the request mapping I have a redirect the dumps the user to "home" if the @PathVariable is not a integer.
However I do not want them to be dumped to home if they are matching the path/echo. I tried setting a <property name="order" value="0" /> on the view resolve however, without a order on the context, that is still taking priority.
How can I set priority on my component scan, or force the view-resolver to be matched first before the annotated controllers.
/e{number:\d+}should steer you in the right direction for a Google search.@RequestMapping(value = "/e{^\\+?\\d+\$}"but neither worked. I am going to keep trying and see what I can find.@RequestMapping(value = "/{^\\e+?\\d+\$}"and I get a 400 error sayingThe request sent by the client was syntactically incorrect.