From b7c37c2807e117b67559b896cf2dbc05fa66c244 Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Tue, 10 Oct 2017 14:39:06 -0700 Subject: [PATCH] Expose webServer from ReactiveWebServerApplicationContext Closes gh-9746 --- .../context/ReactiveWebServerApplicationContext.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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