title: How to Use SimpleUrlHandlerMapping with SpringBoot
body: <p>I am using SpringBoot and want to configure SimpleUrlHandlerMapping bean for my custom mapping. For that follow are the piece of code that I wrote. </p>
  
  <pre><code>@Configuration
  public class WebConfiguration {
  
      @Bean
      public SimpleUrlHandlerMapping simpleUrlHandlerMapping() {
          System.out.println("creating  SimpleUrlHandlerMapping ....");
          SimpleUrlHandlerMapping simpleUrlHandlerMapping = new SimpleUrlHandlerMapping();
          simpleUrlHandlerMapping.setOrder(0);
          Properties urlProperties = new Properties();
          urlProperties.put("/index", "myController");
  
          simpleUrlHandlerMapping.setMappings(urlProperties);
  
          return simpleUrlHandlerMapping;
      }
  }
  </code></pre>
  
  <p>I also have one Controller with name myController and its code looks like this.</p>
  
  <pre><code>@Controller("myController")
  public class MyController extends AbstractController {
  
      @Override
      protected ModelAndView handleRequestInternal(HttpServletRequest arg0, HttpServletResponse arg1) throws Exception {
          System.out.println("My Controller!");
          return null;
      }
  
  }
  </code></pre>
  
  <p>Now as per code when <a href="http://localhost:7171//index" rel="nofollow noreferrer">http://localhost:7171//index</a> is hit then it should print the My Controller message on console. But it not touch this code. 
  Because this is an SpringBoot application and on start it print this bean registration with myController. </p>
  
  <p>Could someone help to resolve this issue and tell me whats wrong in this code. </p>
  
  <p>Thanks in advance.</p>