Spring~ In-depth understanding of AOP (1)

        AOP is a supplement to object-oriented oop, oop object-oriented programming ----> open and closed principle: internal modification is not allowed on the basis of source code, but external expansion is allowed.

 

        AOP idea ---> Aspect-oriented programming



 

 

       One, JDKAop (JDK's dynamic proxy method)

               Through the dynamic implantation of the interface we enhance the runtime implantation aspect (enhanced logic)

 

        Second, CGLIB (dynamic proxy based on bytecode compilation)

                Subclass byte encoding technique of target class

        The above two choose which one to use through the configuration file

 

        Aspects : transaction-oriented modules and log modules. Before or after the core business is completed, some aspects must be processed, fixed or not.

        Connection point : Through the target class configuration, get the method in the (server) class we need to implant.

        Enhancement (advice) : It goes with our core business code and handles a lot of things

        Pointcut : Only support spring method pointcut

        Target object (interface ):

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326216487&siteId=291194637