0
ApplicationListenerとServletContextListenerの違いは何ですか?あなたはいつそれらを使いますか?ApplicationListenerとServletContextListenerの比較
implements ApplicationListener<ContextStartedEvent>
implements ServletContextListener
ApplicationListenerとServletContextListenerの違いは何ですか?あなたはいつそれらを使いますか?ApplicationListenerとServletContextListenerの比較
implements ApplicationListener<ContextStartedEvent>
implements ServletContextListener
一つは、あなたのSpringアプリケーション(例えばContextRefreshedEvent)のアプリケーションスコープのイベントを監視することを可能にし、他のは、あなたがのServletContextのライフサイクルイベント(initialized/destroyed)を監視することができます。前者はSpringアプリケーション関連、後者はコンテナ関連です。