Spring is an open-source, lightweight framework whose core is inversion of control (IOC) and aspect-oriented programming (AOP).
As a business layer framework, spring is a good way to integrate the presentation layer with the persistence layer.
IOC: Writes the creation and dependency of a class to a configuration file, allowing the dependency of an object to be injected by a configuration file instead of being active to new, allowing for loose coupling.
Popular point is: the creation of the object of control to transfer, the creation of the object and the creation of the time is self-control, now put him to the IOC container, dedicated to create the object of the factory, changed the original dependency, now become dependent on the IOC container.
IOC creates an object in 3 ways: 1. Call the parameterless constructor 2. Constructor with parameters 3. Factory Class Create Object
AOP: The aspect-oriented programming that encapsulates some of the cross-cutting business logic (security, logs, things, etc.) in a program into a slice and then injects it into the target object (the specific business logic).
Separate processing can be done through the corresponding classes and XML configuration.
Pros: 1. Using the IOC container reduces coupling and allows you to focus more on business logic.
2. Low-intrusive design, code reuse is high, easy to maintain.
3. Integration with third-party frameworks works well.
Java Classic face Question---2----->spring framework of the relevant introduction