October 2017
Intermediate to advanced
396 pages
10h 2m
English
In a Spring application, all Spring beans spend 99.99% of their time in this phase. If the initialization phase is completed successfully, then the Spring beans come into this phase. Here, beans are used by clients as application services. These beans process client requests, and carry out application behaviors. In the Use phase, let's see how to invoke a bean obtained from the context in the application where it is used. Please refer to the following code:
//Get or create application context from somewhere
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
// Lookup the entry point into the application
TransferService transferService = context.getBean(TransferService.class); ...Read now
Unlock full access