Spring AOP错误Bean named is expected to be of type'xx'but was actually of type 'com.sun.proxy.$Proxy5'
Spring AOP问题:
使用.class加载报错,使用bean的name正常运行
在测试代码中,使用class直接获取bean会出现如下错误:
使用到.class获取bean,出现以下错误。
使用bean的name获取不会出现错误。
Exception in thread "main" org.springframework.beans.factory.BeanNotOfRequiredTyp...
原创
2019-11-13 18:46:44 ·
2441 阅读 ·
0 评论