<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.5-SNAPSHOT</li>
<li>Operating System version: win10</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">A compilation error occurred when cloning the latest code to local, as follows: cannot resolve com.alibaba.spring: Spring context support: 1.0.4-snapshotPls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps？</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.0</li>
<li>Operating System version: mac</li>
<li>Java version: 1.8</li>
</ul>
<p dir="auto"><code class="notranslate">org.apache.dubbo.config.AbstractConfig</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="static {
    // this is only for compatibility
    Runtime.getRuntime().addShutdownHook(DubboShutdownHook.getDubboShutdownHook());
}"><pre class="notranslate"><code class="notranslate">static {
    // this is only for compatibility
    Runtime.getRuntime().addShutdownHook(DubboShutdownHook.getDubboShutdownHook());
}
</code></pre></div>
<p dir="auto">The jvm hook is registered by default. When the user uses spring, the default hook is not removed. It was the earliest cause of this shutdown graceful, mainly due to this reason.  Please note：<br>
Spring does not register hooks by default, but users may register themselves, spring-boot will also register hooks by default.</p>
<p dir="auto"><code class="notranslate">org.apache.dubbo.config.spring.extension.SpringExtensionFactory.ShutdownHookListener</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="private static class ShutdownHookListener implements ApplicationListener {
    @Override
    public void onApplicationEvent(ApplicationEvent event) {
        if (event instanceof ContextClosedEvent) {
            // we call it anyway since dubbo shutdown hook make sure its destroyAll() is re-entrant.
            // pls. note we should not remove dubbo shutdown hook when spring framework is present, this is because
            // its shutdown hook may not be installed.
            DubboShutdownHook shutdownHook = DubboShutdownHook.getDubboShutdownHook();
            shutdownHook.destroyAll();
        }
    }
}"><pre class="notranslate"><code class="notranslate">private static class ShutdownHookListener implements ApplicationListener {
    @Override
    public void onApplicationEvent(ApplicationEvent event) {
        if (event instanceof ContextClosedEvent) {
            // we call it anyway since dubbo shutdown hook make sure its destroyAll() is re-entrant.
            // pls. note we should not remove dubbo shutdown hook when spring framework is present, this is because
            // its shutdown hook may not be installed.
            DubboShutdownHook shutdownHook = DubboShutdownHook.getDubboShutdownHook();
            shutdownHook.destroyAll();
        }
    }
}
</code></pre></div>