a applicationEvent has been register to listen the applicationClose event,like this
@Component
public class ApplicationStoppedEventListener implements ApplicationListener<ContextClosedEvent> {}
if management port is not same with application port, the ContextClosedEvent will be fired 2 times
Comment From: refeccd
I would like to ask why the management context needs to treat the current application context as a parent
Comment From: wilkinsona
This is to be expected as, when there is a separate management port, the management server runs in a separate application context. It uses the application's main context as a parent to allow it to find and use beans in that context.
If you have any further questions, please follow up on Stack Overflow or Gitter. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.