File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
springdoc-openapi-common/src/main/java/org/springdoc/core Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 3030import org .springframework .boot .actuate .autoconfigure .endpoint .web .WebEndpointProperties ;
3131import org .springframework .boot .actuate .autoconfigure .web .server .ManagementServerProperties ;
3232import org .springframework .boot .autoconfigure .web .ServerProperties ;
33+ import org .springframework .boot .web .context .WebServerApplicationContext ;
3334import org .springframework .boot .web .context .WebServerInitializedEvent ;
3435import org .springframework .boot .web .server .WebServer ;
3536import org .springframework .context .ApplicationContext ;
@@ -102,12 +103,11 @@ public ActuatorProvider(Optional<ManagementServerProperties> managementServerPro
102103
103104@ Override
104105public void onApplicationEvent (WebServerInitializedEvent event ) {
105- if ("application" .equals (event .getApplicationContext ().getId ())) {
106- applicationWebServer = event .getWebServer ();
107- }
108- else if ("application:management" .equals (event .getApplicationContext ().getId ())) {
106+ if (WebServerApplicationContext .hasServerNamespace (event .getApplicationContext (), "management" )) {
109107managementApplicationContext = event .getApplicationContext ();
110108actuatorWebServer = event .getWebServer ();
109+ } else {
110+ applicationWebServer = event .getWebServer ();
111111}
112112}
113113
You can’t perform that action at this time.
0 commit comments