ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(propertyResolver.getProperty("corePoolSize", Integer.class, 2));
executor.setMaxPoolSize(propertyResolver.getProperty("maxPoolSize", Integer.class, 50));
executor.setQueueCapacity(propertyResolver.getProperty("queueCapacity", Integer.class, 10000));
executor.setThreadNamePrefix("jhipster-Executor-");
return new ExceptionHandlingAsyncTaskExecutor(executor);
}