目录
一、Spring-AOP。
(1)AOP的简介。
(2)AOP的底层实现-动态代理。
(2.1)JDK的动态代理。
(2.2)cglib的动态代理。
(3)AOP的相关概念。
(4)xml配置——AOP的快速入门。
(5) xml配置AOP详解。
(5.1)切点表达式的写法。
(5.2)通知的类型。
(5.3)切点表达式的抽取。
(5.4)知识要点。
(6)注解配置——AOP的快速入门。
(7)注解配置AOP详解。
(7.1)注解通知的类型。
(7.2)切点表达式的抽取。
(7.3) 知识要点。
一、Spring-AOP。
(1)AOP的简介。

(2)AOP的底层实现-动态代理。

(2.1)JDK的动态代理。

(2.2)cglib的动态代理。

(3)AOP的相关概念。


(4)xml配置——AOP的快速入门。
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
                            http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
    <!--1、目标对象-->
    <bean id="target" class="aop.Target"/>
    <!--2、切面对象-->
    <bean id="myAspect" class="aop.MyAspect"></bean>
    <!--3、配置织入:告诉spring框架,哪些方法需要进行哪些增强(前置,后置,等等...)-->
    <aop:config>
        <!--声明切面-->
        <aop:aspect ref="myAspect">
            <!--切面:切点+通知,注意下面的这组</aop:before>标签要在同一行才行,不然会报错-->
            <aop:before method="before" pointcut="execution(public void aop.Target.save())"></aop:before>
            <aop:around method="around" pointcut="execution(* aop..*.*(..))"/>
            <aop:before method="before" pointcut="execution(* aop.*.*(..))"></aop:before>
            <aop:after-returning method="afterReturning" pointcut="execution(* aop.*.*(..))"/>
            <aop:after-throwing method="afterThrowing" pointcut="execution(* aop..*.*(..))"></aop:after-throwing>
            <aop:after method="after" pointcut="execution(* *..*.*(..))"/>
        <!--抽取切点表达式-->
            <aop:pointcut id="myPointcut" expression="execution(* aop.*.*(..))"/>
            <aop:around method="around" pointcut-ref="myPointcut"/>
            <aop:after method="after" pointcut-ref="myPointcut"/>
        </aop:aspect>
    </aop:config>
</beans>
(5) xml配置AOP详解。
(5.1)切点表达式的写法。

(5.2)通知的类型。

(5.3)切点表达式的抽取。

(5.4)知识要点。

(6)注解配置——AOP的快速入门。

(7)注解配置AOP详解。
(7.1)注解通知的类型。
 (7.2)切点表达式的抽取。
(7.2)切点表达式的抽取。
 

(7.3) 知识要点。




















