碰到Caused by: org.springframework.aop.framework.AopConfigException: Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify proxy interfaces.异常怎么处理?
报此异常是因为项目中缺少了cglib-nodep-2.1_3.jar包,导入即可!
- 假如你项目是非maven项目,则需下载cglib-nodep-2.1_3.jar包,放到项目下
- 若为maven项目,则只需要在pom.xml文件中引入依赖即可。在maven中央仓库搜索,找到对应的依赖代码,copy到pom.xml中。