How to define RequestMapping prioritization
- by James Skidmore
I have a situation where I need the following RequestMapping:
@RequestMapping(value={"/{section}"})
...method implementation here...
@RequestMapping(value={"/support"})
...method implementation here...
There is an obvious conflict. My hope was that Spring would resolve this automatically and map /support to the second method, and everything else to the first, but it instead maps /support to the first method.
How can I tell Spring to allow an explicit RequestMapping to override a RequestMapping with a PathVariable in the same place?
(Edit - this is simplified, I know that having those two RequestMapping alone wouldn't make much sense)