diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java index 7f5bc03d4d..57e25c2bec 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java @@ -89,6 +89,15 @@ public class ReactiveWebServerApplicationContext initPropertySources(); } + /** + * Returns the {@link WebServer} that was created by the context or {@code null} if + * the server has not yet been created. + * @return the web server + */ + public WebServer getWebServer() { + return this.webServer; + } + /** * Return the {@link ReactiveWebServerFactory} that should be used to create the * reactive web server. By default this method searches for a suitable bean in the