org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'coreService' defined in class path resource [beans.xml]: Initialization of bean failed; 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.
对应的Bean没有实现接口导致:
public class CoreService<T> { }
改成
public class CoreService<T> implements ICoreService {}
就可以

本文探讨了Spring框架中AOP配置错误导致的BeanCreationException异常,并提供了具体的解决办法。核心问题是目标类未实现接口,导致无法使用CGLIB进行代理。
4960

被折叠的 条评论
为什么被折叠?



