title: EmbeddedServletContainerCustomizer and ConfigurableEmbeddedServletContainer in Spring Boot 2
body: <p>We are using the next interfaces in Spring Boot 1.5.9, working without any problem: <code>ConfigurableEmbeddedServletContainer</code> and <code>EmbeddedServletContainerCustomizer</code>.</p>
  
  <p>We have upgraded to Spring Boot 2 (2.0.0.M7), and these interfaces don't exist. We think they have been modified for other interfaces with the same purpose but we don't know what they are.</p>
  
  <p>Could somebody help us in order to know how to modify this piece of code for having the same behaviour we had in Spring 1.5.9?</p>
  
  <p>The code we have is the next:</p>
  
  <pre><code>@Bean
  public EmbeddedServletContainerCustomizer containerCustomizer() throws FileNotFoundException {
  
      final TomcatConnectorCustomizer customizer = new MyTomcatConnectionCustomizer(absoluteKeystoreFile,
              keystoreType, keystorePassword);
      return new EmbeddedServletContainerCustomizer() {
  
          @Override
          public void customize(ConfigurableEmbeddedServletContainer container) {
              if (container instanceof TomcatEmbeddedServletContainerFactory) {
                  TomcatEmbeddedServletContainerFactory containerFactory = (TomcatEmbeddedServletContainerFactory) container;
                  containerFactory.addConnectorCustomizers(customizer);
  
                  Connector connector = new Connector(TomcatEmbeddedServletContainerFactory.DEFAULT_PROTOCOL);
                  connector.setPort(port);
                  containerFactory.addAdditionalTomcatConnectors(connector);
  
              }
          }
      };
  }
  </code></pre>