is expected to be of type 'org.com.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.com.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 只要去掉上面的文件,就行
应该是重复定义