The Java framework of spring as the leader of the entire project, can effectively manage the objects of each layer, effective coordinated operation, when the system of Western medicine reconstruction, can greatly reduce the amount of rewriting code.
Dependency injection and control inversion belong to the same concept, in Java, when a class (caller) needs the assistance of another class (callee), in the previous program design concept, the caller class is usually created as an instance of the Callee class (new one Callee Class). This approach to new objects typically creates a space in Java space, which can have an impact on the overall efficiency of the Java project and is a more rude approach. In the spring framework, however, the task of creating the calling class is no longer done by the caller class but by the framework (that is, the instantiated control is changed by the programmer to the container of spring), and the phenomenon becomes a control reversal (that is, reversing some of the previous ways of working). The instantiation of the caller class is usually done by the spring container, which is then injected into the caller, which is called dependency injection.
In the usual way, each invocation of the callee class requires instantiating a callee class, and if there are many classes that need to invoke the callee class, instantiate many of the callee classes. Now the spring framework assumes the middle side and prepares the callee class, who needs the callee class and the callee class is injected into the caller.
A preliminary understanding of the Java Framework Spring's dependency injection