Tabnine Logo
EnableScheduling
Code IndexAdd Tabnine 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
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

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • requestLocationUpdates (LocationManager)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now