1.Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sword' defined in class path resource [Demo/applicationContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException:
#問題解決:缺少了 aspectjweaver.jar 包,下載地址
#順便附上另一個有可能缺少的包:aopalliance-1.0.jar,下載地址
2.Exception in thread "main" java.lang.ClassCastException: class com.sun.proxy.$Proxy11 cannot be cast to class XXX
(com.sun.proxy.$Proxy11 and Demo.BraveKnight are in unnamed module of loader 'app')
#報錯信息:動態代理生成的類無法轉換到我們自定義的實現類
#問題解決:在aop:config標簽中添加 proxy-target-class="true" 即可。
3.<aop:aspectj-autoproxy /> 引起UnsatisfiedDependencyException問題解決;
#解決方法:aspectjweaver包太老了,換成最新版本即可解決. 下載地址