admin管理员组文章数量:1566354
is expected to be of type 'org.ssh.hibernate.AOPService.EchoTest' but was actually of type 'com.
做一个aop 来关闭 Session 但是出现以上错误
找了找去 beans.xml 出了问题
<!-- 启动@AspectJ支持 -->
<aop:aspectj-autoproxy/>
<!-- aop -->
<bean class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator"/>
<!-- 自动收aop 实现类 -->
<context:component-scan base-package="org.ssh.hibernate.AOPService">
<context:include-filter type="annotation" expression="org.aspectj.lang.annotation.Aspect"/>
</context:component-scan>、
以上是我错误的配置
<!-- aop -->
<bean class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator"/>
有两个声明aop 只要去掉上面的文件,就行
应该是重复定义
本文标签: orgtypeexpectedSSHEchoTest
版权声明:本文标题:is expected to be of type 'org.com.ssh.hibernate.AOPService.EchoTest' but was actually of type 'com. 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1726603757a1077324.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论