Skip to content

Conversation

@spartusch
Copy link
Contributor

The previous code attempts to differentiate between the application and the management servers by comparing event.getApplicationContext().getId(). This ID does contain the value of the spring.application.name property though. This property defaults to "application" and thus the IDs default to "application" and "application:management". The previous code does look for these default values. But this means that ActuatorProvider isn't initialized properly when spring.application.name is not set to the default value but to the application's name.

This fix checks the server namespace instead.

Fixes #996

@bnasslahsen
Copy link
Collaborator

Thank you @spartusch for your contribution.

@bnasslahsen bnasslahsen merged commit 718c736 into springdoc:master Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minimal project with use-management-port set causes NPE on api-docs endpoint

2 participants