Package es.kukenan.smartfi.common.config
Class AsyncExecutorConfig
java.lang.Object
es.kukenan.smartfi.common.config.AsyncExecutorConfig
This class object is to configure and provide the Asynchronous Executor bean.
This is the customization performed:
- Pass the MDC context to asynchronous threads.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classDecorator that propagates MDC in asynchronous executions. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RequestContextManagerRequest context metadata manager.private IntegerProperty task executor core pool size.private IntegerProperty task executor core pool size. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.scheduling.concurrent.ThreadPoolTaskExecutorCreate the customized executor.org.springframework.web.servlet.config.annotation.WebMvcConfigurerConfigure asynchronous task executor in WebMVC.
-
Field Details
-
requestContextManager
Request context metadata manager. -
threadCorePoolSize
Property task executor core pool size. -
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.
-