@EnableAsync @Configuration public class ThreadPoolConfig extends Object implements org.springframework.scheduling.annotation.AsyncConfigurer
| 构造器和说明 |
|---|
ThreadPoolConfig() |
| 限定符和类型 | 方法和说明 |
|---|---|
Executor |
getAsyncExecutor()
配置注解@Async的
|
org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler |
getAsyncUncaughtExceptionHandler() |
protected ScheduledExecutorService |
scheduledExecutorService()
执行周期性或定时任务
|
public Executor getAsyncExecutor()
getAsyncExecutor 在接口中 org.springframework.scheduling.annotation.AsyncConfigurerpublic org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler()
getAsyncUncaughtExceptionHandler 在接口中 org.springframework.scheduling.annotation.AsyncConfigurer@Bean(name="scheduledExecutorService") protected ScheduledExecutorService scheduledExecutorService()
Copyright © 2024. All rights reserved.