Spring3 Hibernate4 AopConfigException CGLIB2 is not available

来源:互联网 发布:软件外包商务网 编辑:程序博客网 时间:2024/06/06 08:51

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 {}

就可以

原创粉丝点击