Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-10448

Documentation example miss @EnableScheduling

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.2.2
    • Fix Version/s: 4.2.3
    • Component/s: [Documentation]
    • Labels:
      None

      Description

      Doc say

      "Alternatively, if MyTask were annotated with @Component, the following configuration would ensure that its @Scheduled method is invoked at the desired interval:

      @Configuration
      @ComponentScan(basePackages="com.myco.tasks")
      public class AppConfig {
      }
      "

      The code example is wrong as it does not use @EnableScheduling. It must be like this:

      @Configuration
      @EnableScheduling
      @ComponentScan(basePackages="com.myco.tasks")
      public class AppConfig {
      }

        Attachments

          Activity

            People

            • Assignee:
              snicoll Stéphane Nicoll
              Reporter:
              janning Janning Vygen
              Last updater:
              Stéphane Nicoll
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 4 weeks, 5 days ago