|
|
|
|
62
|
return registrationBean;
|
62
|
return registrationBean;
|
63
|
}
|
63
|
}
|
64
|
|
64
|
|
65
|
@Bean
|
|
|
|
|
65
|
/* @Bean
|
66
|
public ThreadPoolTaskExecutor executor(){
|
66
|
public ThreadPoolTaskExecutor executor(){
|
67
|
ThreadPoolTaskExecutor executor=new ThreadPoolTaskExecutor();
|
67
|
ThreadPoolTaskExecutor executor=new ThreadPoolTaskExecutor();
|
68
|
executor.setCorePoolSize(10); //核心线程数
|
68
|
executor.setCorePoolSize(10); //核心线程数
|
|
|
|
|
72
|
executor.setThreadNamePrefix("fsx-Executor-"); //指定用于新创建的线程名称的前缀。
|
72
|
executor.setThreadNamePrefix("fsx-Executor-"); //指定用于新创建的线程名称的前缀。
|
73
|
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
73
|
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
74
|
return executor;
|
74
|
return executor;
|
75
|
}
|
|
|
|
|
75
|
}*/
|
76
|
}
|
76
|
}
|