title: Spring @Scheduled within a @Configuration class
body: <p>When I run the following class,the method "mywork()" will not be scheduled by Spring.</p>
  
  <pre><code>@Configuration
  @EnableScheduling
  public class AppConfig {
  
      @Scheduled(fixedRate = 1000)
      public void mywork(){
          System.out.println("test");
      }
  
      @Bean(name = "propertyConfigurer")
      public PropertyPlaceholderConfigurer propertyConfigurer(){
          PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
          return ppc;
      }
  
      public static void main(String[] args) {
          ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
      }
  }
  </code></pre>
  
  <p>But if I delete the Bean definition of propertyConfigurer,it will work normally.</p>
  
  <pre><code>@Configuration
  @EnableScheduling
  public class AppConfig {
  
      @Scheduled(fixedRate = 1000)
      public void mywork(){
          System.out.println("test");
      }
  
      public static void main(String[] args) {
          ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
      }
  }
  </code></pre>
  
  <p>Who can tell me why?</p>