title: Spring Webflux Netty http and https
body: <p>I have a requirement where in a Spring Webflux Application I need to listen to HTTP and HTTPS port. I could easily configure HTTPS using </p>
  
  <pre><code>@Bean
  public WebServerFactoryCustomizer&lt;NettyReactiveWebServerFactory&gt; customizer() {
      return new WebServerFactoryCustomizer&lt;NettyReactiveWebServerFactory&gt;() {
          @Override
          void customize(NettyReactiveWebServerFactory factory) {
              Ssl ssl = new Ssl()
              // Your SSL Cusomizations
              ssl.setEnabled(true)
              ssl.setKeyStore(keystorePath)
              ssl.setKeyPassword(keystorePass)
              factory.setSsl(ssl)
          }
      }
  }
  </code></pre>
  
  <p>I am not sure how to add HTTP listener for Netty. For Tomcat Servlet model I have found <a href="https://dzone.com/articles/enable-httphttps-spring-boot" rel="nofollow noreferrer">https://dzone.com/articles/enable-httphttps-spring-boot</a>. Looking a similar setup for Netty Webflux.</p>