Created
February 7, 2018 14:49
-
-
Save predic8/afa90f194a27b903fd8d1e0d4c8abd48 to your computer and use it in GitHub Desktop.
WebFlux main with Netty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
ApplicationContext ctx = SpringApplication.run(ReactiveWebApplication.class, args); | |
HttpHandler handler = WebHttpHandlerBuilder.applicationContext(ctx).build(); | |
ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); | |
HttpServer.create("localhost", 8080).newHandler(adapter).block(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment