title: packagesToScan in Spring Configuration
body: <p>I have a spring 3.2 application where the Annotation based Config file is as below:</p>
  
  <pre><code>@Configuration
  @EnableWebMvc
  @Profile("production")
  @ComponentScan(basePackages = {"com.mypackage"})
  @PropertySource({"classpath:myproperty.properties"})
  public class WebConfig extends WebMvcConfigurationSupport{
  
      @Override
      protected void configureContentNegotiation(ContentNegotiationConfigurer configurer) {                configurer.favorPathExtension(false).favorParameter(true).parameterName("mediaType").ignoreAcceptHeader(true).useJaf(false)
          .defaultContentType(MediaType.APPLICATION_JSON).mediaType("xml", MediaType.APPLICATION_XML)
          .mediaType("json", MediaType.APPLICATION_JSON);
      }
  
      @Bean(name = "appProperty")
      public static PropertySourcesPlaceholderConfigurer appProperty() {
          return new PropertySourcesPlaceholderConfigurer();
      }
  }
  </code></pre>
  
  <p>I am trying to give some flexibility, which precisely means user of this application can develop a spring component and package it in a jar (the package name can be anything, but all the component classes extend a class from my application). I want to understand how do I make the discovery of the new component feasible? The user definitely cannot change anything in my application code, he has access to the web.xml and may be a properties file only.</p>
  
  <p>I need a way to read the supplied package name and then invoke the component scan on the application context. Any help is really appreciated. </p>
  
  <p>Thanks.</p>