Spring Framework (Summary – Spring AOP)
class=”markdown_views prism-dracula”> Summary on the Spring Framework (3. Spring AOP) 3. Spring AOP Spring AOP 3.1. Basic concepts of Spring AOP 3.2. Dynamic proxy 3.3. Common terms of AOP 3.4. XML-based configuration development 3.5. Annotation-based development 3.1. Basic concepts of Spring AOP AOP (Aspect-Oriented Programming) is aspect-oriented programming, a technology that achieves unified maintenance of program functions through pre-compilation and runtime dynamic agents. It complements OOP (Object-Oriented Programming, Object-Oriented Programming) and provides a perspective of abstract software structure different from OOP. In OOP, the class is used as the basic unit of the program, while the basic unit in AOP is Aspect (aspect). AOP can be used to isolate each part of the business logic, so that the coupling degree between the parts of the business logic is reduced, the reusability of the program is improved, and the efficiency of development is improved at the same time. Simply speaking, it is to extract the repeated code of our program, and when it needs to be executed, use dynamic proxy technology to enhance our existing methods without modifying the source code. 3.2. Dynamic proxy There are two commonly used methods for dynamic proxy (1), JDK dynamic proxy (interface-based dynamic proxy) 1.…