This code requests a bean named increaseSpeed
from the Spring application context. Think of the application context as a pool of accessible objects that has been configured from your Spring configuration XML configuration. When the application context starts, it creates beans in the configuration. This call simply requests one that already exists. The application context returns this "bean" as java.lang.Object
, so you must apply it to the appropriate type.
You can see this call as an entry point in a Spring application. This call is necessary to get the first object out of the application context - from there this object can have references to other objects that were introduced using Spring.
CPhelps
source share