title: How to correct Spring MVC RequestMapping order?
body: <p>I have an existing Spring MVC service running with the following RequestMapping.</p>
  
  <pre><code>@RequestMapping(value = "{user}/**", method = RequestMethod.GET)
  </code></pre>
  
  <p>I now need to add a new method to the same controller with the following RequestMapping.</p>
  
  <pre><code>@RequestMapping(value = "api/{user}/**", method = RequestMethod.GET)
  </code></pre>
  
  <p>When I test against the new URL, Spring is always choosing the first function so that this
  second function is inaccessible.</p>
  
  <p>Is there anyway that I can get Spring to use my new "api" method? The only option I can think of is to create a new Java servlet in my web.xml, but I'd like to do something simpler. I did try making two different controllers, with <code>@Controller</code> and <code>@Controller("api")</code>, but that did not solve the problem.</p>