org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'calc' defined in file [G:\study\tutorial\ssm\spring_05\target\classes\com\atguigu\aop\CalcImpl.class]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: warning no match for this type name: com.atguigu.aop [Xlint:invalidAbsoluteTypeName]
发现是切点表达式少写了个点
错误:
//@Pointcut("execution(* com.atguigu.aop.CalcImpl*(..))")
正确
//@Pointcut("execution(* com.atguigu.aop.CalcImpl.*(..))")
本文介绍了一个关于Spring AOP中切点表达式的常见错误,并给出了正确的配置方法。错误在于切点表达式缺少了一个关键的点字符,导致Bean初始化失败。
6567





