spring前置通知的报错,一个很简单的实例。

下面是报错信息和XML以及带有MAIN方法的测试类图片说明
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cu': FactoryBean threw exception on object creation; nested exception is org.springframework.aop.framework.AopConfigException: Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify proxy interfaces.图片说明
图片说明

哥们,缺少jar包 ,cglib.jar

我看过说是好像bean错了,但是我是跟参考书敲的,而且也在网上找到过类似的代码,刚学spring,希望大家能帮忙看一下

哥们,把你的错误复制一下,百度一下。我估计应该是你bean中id的类路径写错了。