exception in thread "main" org.springframework.beans.factory.beancreationexception: error creating bean with name 'cat' defined in class path resource [hvp/spring/aspectj/complex/beans.xml]: beanpostprocessor before instantiation of bean failed; nested exception is java.lang.illegalstateexception: returning argument name 'retval' was not bound in advice arguments
at org.springframework.beans.factory.support.abstractautowirecapablebeanfactory$1.run(abstractautowirecapablebeanfactory.java:405)
at java.security.accesscontroller.doprivileged(native method)
at org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:380)
at org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:264)
at org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:221)
at org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:261)
at org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:185)
at org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:164)
at org.springframework.beans.factory.support.defaultlistablebeanfactory.preinstantiatesingletons(defaultlistablebeanfactory.java:429)
at org.springframework.context.support.abstractapplicationcontext.finishbeanfactoryinitialization(abstractapplicationcontext.java:729)
at org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:381)
at org.springframework.context.support.classpathxmlapplicationcontext.(classpathxmlapplicationcontext.java:139)
at org.springframework.context.support.classpathxmlapplicationcontext.(classpathxmlapplicationcontext.java:83)
at hvp.spring.aspectj.complex.advicecomplextest.main(advicecomplextest.java:12)
caused by: java.lang.illegalstateexception: returning argument name 'retval' was not bound in advice arguments
at org.springframework.aop.aspectj.abstractaspectjadvice.bindexplicitarguments(abstractaspectjadvice.java:476)
at org.springframework.aop.aspectj.abstractaspectjadvice.bindargumentsbyname(abstractaspectjadvice.java:426)
at org.springframework.aop.aspectj.abstractaspectjadvice.calculateargumentbindings(abstractaspectjadvice.java:377)
at org.springframework.aop.aspectj.annotation.reflectiveaspectjadvisorfactory.getadvice(reflectiveaspectjadvisorfactory.java:218)
at org.springframework.aop.aspectj.annotation.instantiationmodelawarepointcutadvisorimpl.instantiateadvice(instantiationmodelawarepointcutadvisorimpl.java:145)
at org.springframework.aop.aspectj.annotation.instantiationmodelawarepointcutadvisorimpl.(instantiationmodelawarepointcutadvisorimpl.java:94)
at org.springframework.aop.aspectj.annotation.reflectiveaspectjadvisorfactory.getadvisor(reflectiveaspectjadvisorfactory.java:134)
at org.springframework.aop.aspectj.annotation.reflectiveaspectjadvisorfactory$1.dowith(reflectiveaspectjadvisorfactory.java:74)
at org.springframework.util.reflectionutils.dowithmethods(reflectionutils.java:435)
at org.springframework.util.reflectionutils.dowithmethods(reflectionutils.java:412)
at org.springframework.aop.aspectj.annotation.reflectiveaspectjadvisorfactory.getadvisors(reflectiveaspectjadvisorfactory.java:70)
at org.springframework.aop.aspectj.annotation.beanfactoryaspectjadvisorsbuilder.buildaspectjadvisors(beanfactoryaspectjadvisorsbuilder.java:110)
at org.springframework.aop.aspectj.annotation.annotationawareaspectjautoproxycreator.findcandidateadvisors(annotationawareaspectjautoproxycreator.java:85)
at org.springframework.aop.aspectj.autoproxy.aspectjawareadvisorautoproxycreator.shouldskip(aspectjawareadvisorautoproxycreator.java:105)
at org.springframework.aop.framework.autoproxy.abstractautoproxycreator.postprocessbeforeinstantiation(abstractautoproxycreator.java:281)
at org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.applybeanpostprocessorsbeforeinstantiation(abstractautowirecapablebeanfactory.java:791)
at org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.resolvebeforeinstantiation(abstractautowirecapablebeanfactory.java:762)
at org.springframework.beans.factory.support.abstractautowirecapablebeanfactory$1.run(abstractautowirecapablebeanfactory.java:399)
... 13 more
///////////////////////////////////////////////////////
定义的返回参数的名字和增强的参数名称不一致,就会抛出此异常..