package com.codespair.mockstocks;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.core.task.TaskExecutor;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;

@Slf4j
@SpringBootApplication
@EnableAsync
public class MockStocksApplication {

    protected MockStocksApplication() {
    }

    @Bean
    public TaskExecutor taskExecutor() {
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        executor.setCorePoolSize(5);
        executor.setMaxPoolSize(10);
        executor.setQueueCapacity(25);
        return executor;
    }

    @SuppressWarnings("squid:S2095")
    public static void main(String[] args) {
        SpringApplication.run(MockStocksApplication.class, args);
    }
}

@@ -545,24 +545,336 @@
 () %7B%0A    %7D%0A%0A
+    /**%0A     * Thread pool to handle Async operations%0A     * @return the thread pool to be used for async and scheduled processes in the application.%0A     * @see %3Ca href=%22https://docs.spring.io/spring/docs/current/spring-framework-reference/html/scheduling.html%22%3ESpring Task Execution and Scheduling%3C/a%3E%0A     */%0A
     @Bean%0A  

add some javadoc about the thread pool executor