Tabnine Logo
AsyncSupportConfigurer.setTaskExecutor
Code IndexAdd Tabnine to your IDE (free)

How to use
setTaskExecutor
method
in
org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer

Best Java code snippets using org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer.setTaskExecutor (Showing top 4 results out of 315)

origin: spring-projects/spring-framework

@Override
public void configureAsyncSupport(AsyncSupportConfigurer configurer) {
  configurer.setDefaultTimeout(2500).setTaskExecutor(new ConcurrentTaskExecutor())
    .registerCallableInterceptors(new CallableProcessingInterceptor() { })
    .registerDeferredResultInterceptors(new DeferredResultProcessingInterceptor() {});
}
origin: chilexun/springboot-demo

  @Override
  protected void configureAsyncSupport(AsyncSupportConfigurer configurer) {
    configurer.setTaskExecutor(new ConcurrentTaskExecutor(Executors.newFixedThreadPool(3)));
    configurer.setDefaultTimeout(30000);
  }
}
origin: com.intoverflow.booster/booster-config

@Override
public void configureAsyncSupport(AsyncSupportConfigurer configurer) {
  configurer.setDefaultTimeout(30000);
  AsyncTaskExecutor taskExecutor = context.getBean("executor", AsyncTaskExecutor.class);
  configurer.setTaskExecutor(taskExecutor);
  super.configureAsyncSupport(configurer);
}
origin: xie19900123/spring-boot-learning

@Override
public void configureAsyncSupport(final AsyncSupportConfigurer configurer) {
  //处理 callable超时
  configurer.setDefaultTimeout(60*1000);
  configurer.registerCallableInterceptors(timeoutInterceptor());
  configurer.setTaskExecutor(getAsyncThreadPoolTaskExecutor());
}

org.springframework.web.servlet.config.annotationAsyncSupportConfigurersetTaskExecutor

Javadoc

Set the default AsyncTaskExecutor to use when a controller method returns a Callable. Controller methods can override this default on a per-request basis by returning a WebAsyncTask.

By default a SimpleAsyncTaskExecutor instance is used, and it's highly recommended to change that default in production since the simple executor does not re-use threads.

Popular methods of AsyncSupportConfigurer

  • setDefaultTimeout
    Specify the amount of time, in milliseconds, before asynchronous request handling times out. In Serv
  • registerCallableInterceptors
    Configure lifecycle interceptors with callbacks around concurrent request execution that starts when
  • <init>
  • getCallableInterceptors
  • getDeferredResultInterceptors
  • getTaskExecutor
  • getTimeout
  • registerDeferredResultInterceptors
    Configure lifecycle interceptors with callbacks around concurrent request execution that starts when

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • startActivity (Activity)
  • compareTo (BigDecimal)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Github Copilot alternatives
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