|
|
@ -42,11 +42,11 @@ public class SampleTomcatTwoConnectorsApplication {
|
|
|
|
@Bean
|
|
|
|
@Bean
|
|
|
|
public EmbeddedServletContainerFactory servletContainer() {
|
|
|
|
public EmbeddedServletContainerFactory servletContainer() {
|
|
|
|
TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory();
|
|
|
|
TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory();
|
|
|
|
tomcat.addAdditionalTomcatConnectors(createNonSslConnector());
|
|
|
|
tomcat.addAdditionalTomcatConnectors(createStandardConnector());
|
|
|
|
return tomcat;
|
|
|
|
return tomcat;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private Connector createNonSslConnector() {
|
|
|
|
private Connector createStandardConnector() {
|
|
|
|
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
|
|
|
|
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
|
|
|
|
connector.setPort(port());
|
|
|
|
connector.setPort(port());
|
|
|
|
return connector;
|
|
|
|
return connector;
|
|
|
|