load tester beta
This commit is contained in:
@@ -9,20 +9,21 @@ import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class ServletConfig {
|
||||
@Value("${server.port.http}")
|
||||
private int serverPortHttp;
|
||||
|
||||
@Bean
|
||||
public ServletWebServerFactory serverFactory() {
|
||||
TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
|
||||
tomcat.addAdditionalTomcatConnectors(createStandardConnector());
|
||||
return tomcat;
|
||||
}
|
||||
@Value("${server.port.http}")
|
||||
private int serverPortHttp;
|
||||
|
||||
private Connector createStandardConnector() {
|
||||
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
|
||||
connector.setPort(serverPortHttp);
|
||||
return connector;
|
||||
}
|
||||
@Bean
|
||||
public ServletWebServerFactory serverFactory() {
|
||||
TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
|
||||
tomcat.addAdditionalTomcatConnectors(createStandardConnector());
|
||||
return tomcat;
|
||||
}
|
||||
|
||||
private Connector createStandardConnector() {
|
||||
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
|
||||
connector.setPort(serverPortHttp);
|
||||
return connector;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user