update 适配 AsyncConfig 替换过期继承类改为实现 AsyncConfigurer 接口

This commit is contained in:
疯狂的狮子Li 2023-01-13 22:52:53 +08:00
parent 41242cd4aa
commit 02bd7ec552

View File

@ -6,7 +6,7 @@ import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.AsyncConfigurerSupport; import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import java.util.Arrays; import java.util.Arrays;
@ -20,7 +20,7 @@ import java.util.concurrent.ScheduledExecutorService;
*/ */
@EnableAsync(proxyTargetClass = true) @EnableAsync(proxyTargetClass = true)
@Configuration @Configuration
public class AsyncConfig extends AsyncConfigurerSupport { public class AsyncConfig implements AsyncConfigurer {
@Autowired @Autowired
@Qualifier("scheduledExecutorService") @Qualifier("scheduledExecutorService")