protected void stop ( ) throws Exception { this . logger . debug ( "Stopping application" ) ; this . stopLock . lock ( ) ; try { for ( ConfigurableApplicationContext context : this . rootContexts ) { context . close ( ) ; this . rootContexts . remove ( context ) ; } cleanupCaches ( ) ; if ( this . forceReferenceCleanup ) { forceReferenceCleanup ( ) ; } } finally { this . stopLock . unlock ( ) ; } System . gc ( ) ; System . runFinalization ( ) ; }
Stop the application .