Skip to content

Commit b7c37c2

Browse files
committed
Expose webServer from ReactiveWebServerApplicationContext
Closes gh-9746
1 parent 96cb948 commit b7c37c2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@ private void createWebServer() {
8989
initPropertySources();
9090
}
9191

92+
/**
93+
* Returns the {@link WebServer} that was created by the context or {@code null} if
94+
* the server has not yet been created.
95+
* @return the web server
96+
*/
97+
public WebServer getWebServer() {
98+
return this.webServer;
99+
}
100+
92101
/**
93102
* Return the {@link ReactiveWebServerFactory} that should be used to create the
94103
* reactive web server. By default this method searches for a suitable bean in the

0 commit comments

Comments
 (0)