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 30
30
import org .springframework .boot .actuate .autoconfigure .endpoint .web .WebEndpointProperties ;
31
31
import org .springframework .boot .actuate .autoconfigure .web .server .ManagementServerProperties ;
32
32
import org .springframework .boot .autoconfigure .web .ServerProperties ;
33
+ import org .springframework .boot .web .context .WebServerApplicationContext ;
33
34
import org .springframework .boot .web .context .WebServerInitializedEvent ;
34
35
import org .springframework .boot .web .server .WebServer ;
35
36
import org .springframework .context .ApplicationContext ;
@@ -102,12 +103,11 @@ public ActuatorProvider(Optional<ManagementServerProperties> managementServerPro
102
103
103
104
@ Override
104
105
public 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" )) {
109
107
managementApplicationContext = event .getApplicationContext ();
110
108
actuatorWebServer = event .getWebServer ();
109
+ } else {
110
+ applicationWebServer = event .getWebServer ();
111
111
}
112
112
}
113
113
You can’t perform that action at this time.
0 commit comments