<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->

- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.

## Describe the proposal
<!-- Please use this for a concrete design proposal for functionality. -->
<!-- If you just want to request a new feature and discuss the possible business value, create a Feature Request. -->

Mark Dubbo Module if is spring managed. Wait spring to close module before execure dubbo shutdown hook.

*/
    private final boolean ignoreListenShutdownHook;
    public DubboShutdownHook(ApplicationModel applicationModel) {
        super("DubboShutdownHook");
        this.applicationModel = applicationModel;
        Assert.notNull(this.applicationModel, "ApplicationModel is null");
        ignoreListenShutdownHook = Boolean.parseBoolean(ConfigurationUtils.getProperty(applicationModel, CommonConstants.IGNORE_LISTEN_SHUTDOWN_HOOK));
        if (ignoreListenShutdownHook) {
            logger.info(CommonConstants.IGNORE_LISTEN_SHUTDOWN_HOOK + " configured, will ignore add shutdown hook to jvm.");
        }
    }
    @Override
    public void run() {
        if (!ignoreListenShutdownHook && destroyed.compareAndSet(false, true)) {
            if (logger.isInfoEnabled()) {
                logger.info("Run shutdown hook now.");
            }
            doDestroy();
        }
    }
    private void doDestroy() {
        applicationModel.destroy();
    }
    /**
     * Register the ShutdownHook
     */
    public void register() {
        if (!ignoreListenShutdownHook && registered.compareAndSet(false, true)) {
            try {
                Runtime.getRuntime().addShutdownHook(this);