I am currently developing a spring boot application which must handle as much as possible http requests at the same time. This is why I would like to modify the number of threads.
In my case I need to do it programmatically. I do not really now how to handle it because I am new to Tomcat and Springboot.
Here I provide my main application code which must run in port 80.
@SpringBootApplication
public class App {
public static void main(String[] args) {
SpringApplication.run(App.class, args);
}
@Component
public class CustomContainer implements EmbeddedServletContainerCustomizer {
public void customize(ConfigurableEmbeddedServletContainer configurableEmbeddedServletContainer) {
configurableEmbeddedServletContainer.setPort(80);
}
}
}
Thanks in advance!