One more fix
This commit is contained in:
parent
8da189334d
commit
45a5db6fd8
|
@ -55,7 +55,6 @@ import org.springframework.scheduling.concurrent.ScheduledExecutorFactoryBean;
|
||||||
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
|
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
|
||||||
|
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@ -112,11 +111,11 @@ public abstract class BaseConfig implements SchedulingConfigurer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean()
|
@Bean()
|
||||||
public ScheduledExecutorService scheduledExecutorService() {
|
public ScheduledExecutorFactoryBean scheduledExecutorService() {
|
||||||
ScheduledExecutorFactoryBean b = new ScheduledExecutorFactoryBean();
|
ScheduledExecutorFactoryBean b = new ScheduledExecutorFactoryBean();
|
||||||
b.setPoolSize(5);
|
b.setPoolSize(5);
|
||||||
b.afterPropertiesSet();
|
b.afterPropertiesSet();
|
||||||
return b.getObject();
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean(name = "mySubscriptionTriggeringProvider")
|
@Bean(name = "mySubscriptionTriggeringProvider")
|
||||||
|
@ -166,16 +165,16 @@ public abstract class BaseConfig implements SchedulingConfigurer {
|
||||||
@Bean()
|
@Bean()
|
||||||
public TaskScheduler taskScheduler() {
|
public TaskScheduler taskScheduler() {
|
||||||
ConcurrentTaskScheduler retVal = new ConcurrentTaskScheduler();
|
ConcurrentTaskScheduler retVal = new ConcurrentTaskScheduler();
|
||||||
retVal.setConcurrentExecutor(scheduledExecutorService());
|
retVal.setConcurrentExecutor(scheduledExecutorService().getObject());
|
||||||
retVal.setScheduledExecutor(scheduledExecutorService());
|
retVal.setScheduledExecutor(scheduledExecutorService().getObject());
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean(name = TASK_EXECUTOR_NAME)
|
@Bean(name = TASK_EXECUTOR_NAME)
|
||||||
public AsyncTaskExecutor taskExecutor() {
|
public AsyncTaskExecutor taskExecutor() {
|
||||||
ConcurrentTaskScheduler retVal = new ConcurrentTaskScheduler();
|
ConcurrentTaskScheduler retVal = new ConcurrentTaskScheduler();
|
||||||
retVal.setConcurrentExecutor(scheduledExecutorService());
|
retVal.setConcurrentExecutor(scheduledExecutorService().getObject());
|
||||||
retVal.setScheduledExecutor(scheduledExecutorService());
|
retVal.setScheduledExecutor(scheduledExecutorService().getObject());
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue