title: spring RequestMappingHandlerMapping not working
body: <p>I´m starting with Spring Boot for that I´m following a tutorial. In the tutorial, they created the controller with the @RequestMapping and GET method, once they have run the application, in the console is displayed something like this:</p>
  
  <blockquote>
    <p>s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/rooms], methods
    = GET}" onto java.util.List&lt;..//more lines</p>
  </blockquote>
  
  <p>But in my case I got an error:</p>
  
  <blockquote>
    <p>s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto
    public
    org.springframework.http.ResponseEntity>
    org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)</p>
  </blockquote>
  
  <p>Why the Mapping is not created? </p>
  
  <p>This is the controller:</p>
  
  <pre><code>package com.frankmoley.london.data.webservice;
  
  import com.frankmoley.london.data.entity.Room;
  import com.frankmoley.london.data.repository.RoomRepository;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.bind.annotation.RequestParam;
  import org.springframework.web.bind.annotation.RestController;
  import java.util.ArrayList;
  import java.util.List;
  
  @RestController
  public class RoomController {
  
      @Autowired
      private RoomRepository repository;
  
      @RequestMapping(value="/rooms", method= RequestMethod.GET)
      List&lt;Room&gt; findAll(@RequestParam(required=false) String roomNumber){
  
         List&lt;Room&gt; rooms = new ArrayList&lt;&gt;();
  
          if(null==roomNumber){
  
              Iterable&lt;Room&gt; results = this.repository.findAll();
              results.forEach(room-&gt; {rooms.add(room);});
          }else{
  
              Room room = this.repository.findByNumber(roomNumber);
              if(null!=room) {
                  rooms.add(room);
              }
          }
          return rooms;
      }
  }
  </code></pre>
  
  <p>Entity:</p>
  
  <pre><code>package com.frankmoley.london.data.entity;
  
  import javax.persistence.*;
  
  @Entity
  @Table(name = "ROOM")
  public class Room {
  
      @Id
      @Column(name = "ROOM_ID")
      @GeneratedValue(strategy = GenerationType.AUTO)
      private long id;
      @Column(name = "NAME")
      private String name;
      @Column(name = "ROOM_NUMBER")
      private String number;
      @Column(name = "BED_INFO")
      private String info;
  
  //getters and setters
  }
  </code></pre>
  
  <p>Repository:</p>
  
  <pre><code>package com.frankmoley.london.data.repository;
  
  import com.frankmoley.london.data.entity.Room;
  import org.springframework.data.repository.CrudRepository;
  import org.springframework.stereotype.Repository;
  
  @Repository
  public interface RoomRepository extends CrudRepository&lt;Room, Long&gt; {
      Room findByNumber(String number);
  
  }
  </code></pre>