有没有人想出如何在Intellij Idea中为Spring Boot应用程序提供颜色输出?
只是想检查是否有人有更快的方法在Spring引导期间为Spring MVC设置TaskExecutor(使用自动配置).这是我到目前为止:
@Bean
protected ThreadPoolTaskExecutor mvcTaskExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setThreadNamePrefix("my-mvc-task-executor-");
executor.setCorePoolSize(5);
executor.setMaxPoolSize(200);
return executor;
}
@Bean
protected WebMvcConfigurer webMvcConfigurer() {
return new WebMvcConfigurerAdapter() {
@Override
public void configureAsyncSupport(AsyncSupportConfigurer configurer) {
configurer.setTaskExecutor(mvcTaskExecutor());
}
};
}
Run Code Online (Sandbox Code Playgroud)
有没有人有更好/更快的方法来做到这一点?
-Joshua