title: Scan REST controller class using class base configuration
body: <p>I am transferring my spring mvc application to spring boot application.
  I am also transferring my xml base configuration to class based.</p>
  
  <p>I have done most of thing running.
  I just dont know that how to scan REST controller package.
  Beans are creating, but REST controller beans is not creating.</p>
  
  <p>Which annotation is used ? At where to give configuration to scan for controller.
  Still don't know.</p>
  
  <p>In XML I have tag :</p>
  
  <pre><code>&lt;context:component-scan base-package="ApiServer" /&gt;
  </code></pre>
  
  <p>Now how to convert it into simple class configuration i don't know.
  Controller :</p>
  
  <pre><code>@Controller
  @RequestMapping(value = SeriesController.BASE_URL)
  public class SeriesController {
  
      public static final String BASE_URL = "/setup/series";  
  
      @RequestMapping(method = RequestMethod.GET)
      public @ResponseBody
      ResponseEntity&lt;List&lt;SeriesResponse&gt;&gt; getSeries(){
          List&lt;SeriesResponse&gt; responses = new ArrayList&lt;&gt;();       
          return new ResponseEntity&lt;&gt;(responses, HttpStatus.OK);
      }
  }
  </code></pre>
  
  <p>Main Class :</p>
  
  <pre><code>@SpringBootApplication
  public class Application  {
      public static void main(String[] args) throws Exception {
          ApplicationContext ctx = SpringApplication.run(Application.class, args);
          String[] beanNames = ctx.getBeanDefinitionNames();
          Arrays.sort(beanNames);
          for (String beanName : beanNames) {
              System.out.println("BEAN :: " + beanName);
          }
      }
      @Bean
      public FilterRegistrationBean filterRegistrationBean() {
          FilterRegistrationBean registrationBean = new FilterRegistrationBean();
          CORSFilter corsFilter = new CORSFilter();
          registrationBean.setFilter(corsFilter);
          registrationBean.setOrder(1);
          return registrationBean;
      }
  }
  </code></pre>