docs: @EachBean(ExecutorConfiguration.class)
      @Bean(preDestroy = "shutdown")
      public ExecutorService executorService(ExecutorConfiguration executorConfiguration) {
          ExecutorType executorType = executorConfiguration.getType();
          switch (executorType) {
              case FIXED:
                  return executorConfiguration
                      .getThreadFactoryClass()
                      .flatMap(InstantiationUtils::tryInstantiate)
                      .map(factory -> Executors.newFixedThreadPool(executorConfiguration.getNumberOfThreads(), factory))
                      .orElse(Executors.newFixedThreadPool(executorConfiguration.getNumberOfThreads(), threadFactory));
  
              case CACHED:
                  return executorConfiguration
                      .getThreadFactoryClass()
                      .flatMap(InstantiationUtils::tryInstantiate)
                      .map(Executors::newCachedThreadPool)
                      .orElse(Executors.newCachedThreadPool(threadFactory));
  
              case SCHEDULED:
                  return executorConfiguration
                      .getThreadFactoryClass()
                      .flatMap(InstantiationUtils::tryInstantiate)
                      .map(factory -> Executors.newScheduledThreadPool(executorConfiguration.getCorePoolSize(), factory))
                      .orElse(Executors.newScheduledThreadPool(executorConfiguration.getCorePoolSize(), threadFactory));
  
              case WORK_STEALING:
                  return Executors.newWorkStealingPool(executorConfiguration.getParallelism());
  
              default:
                  throw new IllegalStateException("Could not create Executor service for enum value: " + executorType);
          }
      }