October 2017
Intermediate to advanced
396 pages
10h 2m
English
In this phase, Spring releases any system resource acquired by the application services. These are eligible for garbage collection. When you close an application context, the destruction phase completes. Let's see the following lines of code in this phase:
//Any implementation of application context
ConfigurableApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
// Destroy the application by closing application context.
applicationContext.close();
In the preceding code, what do you think happens when we call the applicationContext.close() method in this phase? The process that takes place is given as follows :
Read now
Unlock full access