Buggy code:
public class UriTemplateServletAnnotationControllerTests { private DispatcherServlet servlet ; @ Test public void simple ( ) throws Exception { } @ Test public void multiple ( ) throws Exception { } @ Test public void binding ( ) throws Exception { } @ Test public void ambiguous ( ) throws Exception { } @ Test public void relative ( ) throws Exception { } @ Test public void extension ( ) throws Exception { } @ Test public void typeConversionError ( ) throws Exception { } @ Test public void explicitSubPath ( ) throws Exception { } @ Test public void implicitSubPath ( ) throws Exception { } @ Test public void crud ( ) throws Exception { } private void initServlet ( final Class < ? > controllerclass ) throws ServletException { } @ Controller public static class SimpleUriTemplateController { @ RequestMapping ( "//{root}" ) public void handle ( @ PathVariable ( "root" ) int root , Writer writer ) throws IOException { } } @ Controller public static class MultipleUriTemplateController { @ RequestMapping ( "//hotels//{hotel}//bookings//{booking}-{other}" ) public void handle ( @ PathVariable ( "hotel" ) String hotel , @ PathVariable int booking , @ PathVariable String other , Writer writer ) throws IOException { } } @ Controller public static class BindingUriTemplateController { @ InitBinder public void initBinder ( WebDataBinder binder , @ PathVariable ( "hotel" ) String hotel ) { } @ RequestMapping ( "//hotels//{hotel}//dates//{date}" ) public void handle ( @ PathVariable ( "hotel" ) String hotel , @ PathVariable Date date , Writer writer ) throws IOException { } } @ Controller @ RequestMapping ( "//hotels//{hotel}" ) public static class RelativePathUriTemplateController { @ RequestMapping ( "bookings//{booking}" ) public void handle ( @ PathVariable ( "hotel" ) String hotel , @ PathVariable int booking , Writer writer ) throws IOException { } } @ Controller public static class AmbiguousUriTemplateController { @ RequestMapping ( "//hotels//new" ) public void handleSpecific ( Writer writer ) throws IOException { } @ RequestMapping ( "//hotels//{hotel}" ) public void handleVars ( @ PathVariable ( "hotel" ) String hotel , Writer writer ) throws IOException { } @ RequestMapping ( "//hotels//*" ) public void handleWildCard ( Writer writer ) throws IOException { } } @ Controller @ RequestMapping ( "//hotels//*" ) public static class ExplicitSubPathController { @ RequestMapping ( "{hotel}" ) public void handleHotel ( @ PathVariable String hotel , Writer writer ) throws IOException { } } @ Controller @ RequestMapping ( "hotels" ) public static class ImplicitSubPathController { @ RequestMapping ( "{hotel}" ) public void handleHotel ( @ PathVariable String hotel , Writer writer ) throws IOException { } } @ Controller @ RequestMapping ( "hotels" ) public static class CrudController { @ RequestMapping ( method = RequestMethod . GET ) public void list ( Writer writer ) throws IOException { } @ RequestMapping ( method = RequestMethod . POST ) public void create ( Writer writer ) throws IOException { } <START_BUG> @ RequestMapping ( value = "{hotel}" , method = RequestMethod . GET ) <END_BUG> public void show ( @ PathVariable String hotel , Writer writer ) throws IOException { writer . write ( ( "show-" + hotel ) ) ; } @ RequestMapping ( value = "{hotel}" , method = RequestMethod . PUT ) public void createOrUpdate ( @ PathVariable String hotel , Writer writer ) throws IOException { } @ RequestMapping ( value = "{hotel}" , method = RequestMethod . DELETE ) public void remove ( @ PathVariable String hotel , Writer writer ) throws IOException { } } }

Fix:
@ RequestMapping ( value = "//{hotel}" , method = RequestMethod . GET )