Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Webflux Netty http and https

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.

like image 980
Leo Prince Avatar asked Oct 21 '25 02:10

Leo Prince


1 Answers

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

like image 167
Brian Clozel Avatar answered Oct 22 '25 20:10

Brian Clozel