First, Spring introduction
- Spring is an open source framework and a layered architecture;
- The spring goal is to follow a series of interface standards, the advantage is that only a simple Java object or JavaBean to Java EE Development, so that the development of the introduction, testing, application deployment has been simplified;
- Spring has 7 core modules, core (kernel container), AOP (tangent), DAO (transactional support), ORM (o\r mapping Encapsulation), Web (context, service to Web request, etc.), Web MVC (MVC framework);
- Inversion of control (controlled inversion), Dependency injection (Dependency injection)
Ii. controlling the reversal of the IOC
Concept : Control over component objects is transferred to external containers, and the collaboration of objects is established by the container. (no longer responsible for the object itself)
Implementation mode:<1> dependent lookup (Dependency lookup)<2> Dependency Injection (Dependency injection)
Dependency Injection: Setter injected----XML under the bean to increase the property configuration, Java add Get/set method;
Iii. Programming AOP for Facets
Concept: Extracting the cross-business logic from the program, separating the parts of the business logic, reducing the coupling, and focusing on the business logic rather than the entity object;
AOP (Aspect Oriented Programming) OOP (Object oriented programming, OO programming)
Iv. advantages and disadvantages of the framework
Advantages: Reduced coupling, decoupling, AOP, easy to implement business logic, support mainstream framework, high openness, targeted;
Java Summary--spring Framework