Class AsyncExecutorConfig

java.lang.Object
es.kukenan.smartfi.common.config.AsyncExecutorConfig

@Configuration @EnableAsync public class AsyncExecutorConfig extends Object
This class object is to configure and provide the Asynchronous Executor bean.

This is the customization performed:

  • Pass the MDC context to asynchronous threads.
  • Field Details

    • requestContextManager

      @Autowired private RequestContextManager requestContextManager
      Request context metadata manager.
    • threadCorePoolSize

      @Value("${thread.pool.core_pool_size}") private Integer threadCorePoolSize
      Property task executor core pool size.
    • threadMaxPoolSize

      @Value("${thread.pool.max_pool_size}") private Integer threadMaxPoolSize
      Property task executor core pool size.
  • Constructor Details

    • AsyncExecutorConfig

      public AsyncExecutorConfig()
  • Method Details

    • threadPoolTaskExecutor

      @Bean public org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor threadPoolTaskExecutor()
      Create the customized executor.
      Returns:
      customized executor.
    • webMvcConfigurer

      @Bean public org.springframework.web.servlet.config.annotation.WebMvcConfigurer webMvcConfigurer()
      Configure asynchronous task executor in WebMVC.
      Returns:
      WebMvcConfigurer.