4

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

@Bean
public WebServerFactoryCustomizer<NettyReactiveWebServerFactory> customizer() {
    return new WebServerFactoryCustomizer<NettyReactiveWebServerFactory>() {
        @Override
        void customize(NettyReactiveWebServerFactory factory) {
            Ssl ssl = new Ssl()
            // Your SSL Cusomizations
            ssl.setEnabled(true)
            ssl.setKeyStore(keystorePath)
            ssl.setKeyPassword(keystorePass)
            factory.setSsl(ssl)
        }
    }
}

I am not sure how to add HTTP listener for Netty. For Tomcat Servlet model I have found https://dzone.com/articles/enable-httphttps-spring-boot. Looking a similar setup for Netty Webflux.

1 Answer 1

3

This is not supported at the moment. You can watch the following issue in the meantime: https://github.com/spring-projects/spring-boot/issues/12035

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.