Codota Logo
EnableScheduling
Code IndexAdd Codota to your IDE (free)

How to use
EnableScheduling
in
org.springframework.scheduling.annotation

Best Java code snippets using org.springframework.scheduling.annotation.EnableScheduling (Showing top 20 results out of 2,286)

Refine searchRefine arrow

  • Configuration
  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: zhegexiaohuozi/SeimiCrawler

/**
 * @author github.com/zhegexiaohuozi seimimaster@gmail.com
 *         Date: 2015/4/9.
 */
@Configuration
@ImportResource("classpath*:**/seimi*.xml")
@EnableScheduling
public class SeimiDefScanConfig {
}

origin: ityouknow/spring-boot-examples

@SpringBootApplication
@EnableScheduling
public class Application {

  public static void main(String[] args) {
    SpringApplication.run(Application.class, args);
  }
}

origin: qiurunze123/miaosha

@SpringBootApplication
@EnableScheduling
public class GeekQMainApplication {
origin: spring-projects/spring-framework

@Configuration
@EnableScheduling
static class FixedRateTaskConfig_withInitialDelay {
  @Bean
  public AtomicInteger counter() {
    return new AtomicInteger();
  }
  @Scheduled(initialDelay = 1000, fixedRate = 100)
  public void task() {
    counter().incrementAndGet();
  }
}
origin: alibaba/nacos

/**
 * Hello world!
 *
 * @author xxc
 */
@EnableScheduling
@SpringBootApplication
public class NamingApp {

  public static void main(String[] args) {
    SpringApplication.run(NamingApp.class, args);
  }
}

origin: spring-projects/spring-framework

@Configuration
@EnableScheduling
static class AspectConfig {
  @Bean
  public static AnnotationAwareAspectJAutoProxyCreator autoProxyCreator() {
    AnnotationAwareAspectJAutoProxyCreator apc = new AnnotationAwareAspectJAutoProxyCreator();
    apc.setProxyTargetClass(true);
    return apc;
  }
  @Bean
  public static MyAspect myAspect() {
    return new MyAspect();
  }
}
origin: alibaba/nacos

/**
 * Config main
 *
 * @author Nacos
 */
@EnableScheduling
@SpringBootApplication
public class Config {

  public static void main(String[] args) throws UnknownHostException {
    SpringApplication.run(Config.class, args);
  }
}

origin: spring-projects/spring-framework

@Configuration
@EnableScheduling
static class FixedRateTaskConfig implements SchedulingConfigurer {
  @Override
  public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
    taskRegistrar.addFixedRateTask(() -> {}, 100);
  }
  @Bean
  public AtomicInteger counter() {
    return new AtomicInteger();
  }
  @Scheduled(fixedRate = 10)
  public void task() {
    counter().incrementAndGet();
  }
}
origin: macrozheng/mall

@SpringBootApplication
@MapperScan({"com.macro.mall.mapper","com.macro.mall.portal.dao"})
@EnableScheduling
public class MallPortalApplication {

  public static void main(String[] args) {
    SpringApplication.run(MallPortalApplication.class, args);
  }

}

origin: spring-projects/spring-framework

@Configuration
@EnableScheduling
static class Config {
  @Bean
  public PlatformTransactionManager txManager() {
    return new CallCountingTransactionManager();
  }
  @Bean
  public PersistenceExceptionTranslator peTranslator() {
    return mock(PersistenceExceptionTranslator.class);
  }
  @Bean
  public static PersistenceExceptionTranslationPostProcessor peTranslationPostProcessor() {
    return new PersistenceExceptionTranslationPostProcessor();
  }
}
origin: linlinjava/litemall

@SpringBootApplication(scanBasePackages = {"org.linlinjava.litemall"})
@MapperScan("org.linlinjava.litemall.db.dao")
@EnableTransactionManagement
@EnableScheduling
public class Application {

  public static void main(String[] args) throws Exception {
    SpringApplication.run(Application.class, args);
  }

}
origin: spring-projects/spring-framework

@Configuration
@EnableScheduling
static class SchedulingEnabled_withAmbiguousTaskSchedulers_butNoActualTasks {
  @Bean
  public TaskScheduler taskScheduler1() {
    ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
    scheduler.setThreadNamePrefix("explicitScheduler1");
    return scheduler;
  }
  @Bean
  public TaskScheduler taskScheduler2() {
    ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
    scheduler.setThreadNamePrefix("explicitScheduler2");
    return scheduler;
  }
}
origin: linlinjava/litemall

@SpringBootApplication(scanBasePackages = {"org.linlinjava.litemall.db", "org.linlinjava.litemall.core", "org.linlinjava.litemall.wx"})
@MapperScan("org.linlinjava.litemall.db.dao")
@EnableTransactionManagement
@EnableScheduling
public class Application {

  public static void main(String[] args) {
    SpringApplication.run(Application.class, args);
  }

}
origin: zhegexiaohuozi/SeimiCrawler

/**
 * @author github.com/zhegexiaohuozi seimimaster@gmail.com
 * @since 2018/5/8.
 */
@Configuration
@ImportResource("classpath*:**/seimi*.xml")
@EnableScheduling
public class SeimiCrawlerBaseConfig {

  @Bean
  @Conditional(StandaloneCondition.class)
  public RedissonClient initRedisson(){
    SeimiConfig config = CrawlerCache.getConfig();
    if (config == null||!config.isEnableRedissonQueue()){
      return null;
    }
    return Redisson.create(config.getRedissonConfig());
  }
}

origin: forezp/SpringBootLearning

@SpringBootApplication
@EnableScheduling
public class SpringbootSchedulingTasksApplication {

  public static void main(String[] args) {
    SpringApplication.run(SpringbootSchedulingTasksApplication.class, args);
  }
}

origin: spring-projects/spring-framework

@Configuration
@EnableScheduling
static class AmbiguousExplicitSchedulerConfig {
  @Bean
  public TaskScheduler taskScheduler1() {
    ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
    scheduler.setThreadNamePrefix("explicitScheduler1");
    return scheduler;
  }
  @Bean
  public TaskScheduler taskScheduler2() {
    ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
    scheduler.setThreadNamePrefix("explicitScheduler2");
    return scheduler;
  }
  @Scheduled(fixedRate = 10)
  public void task() {
  }
}
origin: linlinjava/litemall

@SpringBootApplication(scanBasePackages = {"org.linlinjava.litemall.db", "org.linlinjava.litemall.core", "org.linlinjava.litemall.admin"})
@MapperScan("org.linlinjava.litemall.db.dao")
@EnableTransactionManagement
@EnableScheduling
public class Application {

  public static void main(String[] args) {
    SpringApplication.run(Application.class, args);
  }

}
origin: spring-projects/spring-framework

@Configuration
@EnableScheduling
static class SchedulingEnabled_withAmbiguousTaskSchedulers_andSingleTask {
  @Scheduled(fixedRate = 10L)
  public void task() {
  }
  @Bean
  public TaskScheduler taskScheduler1() {
    ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
    scheduler.setThreadNamePrefix("explicitScheduler1");
    return scheduler;
  }
  @Bean
  public TaskScheduler taskScheduler2() {
    ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
    scheduler.setThreadNamePrefix("explicitScheduler2");
    return scheduler;
  }
}
origin: spring-cloud/spring-cloud-kubernetes

/**
 *
 */
@SpringBootApplication
@EnableScheduling
public class App {

  public static void main(String[] args) {
    SpringApplication.run(App.class, args);
  }

}

origin: spring-projects/spring-framework

@Configuration
@EnableScheduling
static class ExplicitSchedulerConfig {
  String threadName;
  @Bean
  public TaskScheduler myTaskScheduler() {
    ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
    scheduler.setThreadNamePrefix("explicitScheduler-");
    return scheduler;
  }
  @Bean
  public AtomicInteger counter() {
    return new AtomicInteger();
  }
  @Scheduled(fixedRate = 10)
  public void task() {
    threadName = Thread.currentThread().getName();
    counter().incrementAndGet();
  }
}
org.springframework.scheduling.annotationEnableScheduling

Most used methods

  • <init>

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setContentView (Activity)
  • findViewById (Activity)
  • getSystemService (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • BoxLayout (javax.swing)
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now