public static FactoryBean<ExecutorService> newThreadPoolExecutorFactoryBean(final ConnectionPoolingProperties config) {
        val bean = new ThreadPoolExecutorFactoryBean();
        bean.setMaxPoolSize(config.getMaxSize());
        bean.setCorePoolSize(config.getMinSize());
        bean.afterPropertiesSet();
        return bean;
    }
New thread pool executor factory bean.

@param config the config
@return the thread pool executor factory bean
api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/support/Beans.java