天天看點

Spring AOP異常:Error creating bean with name ‘org.springframework.aop.aspectj.

Spring AOP異常:Error creating bean with name ‘org.springframework.aop.aspectj.

解決方案

右鍵單擊項目,選擇Configure build path->Add External Jars:

将這三個jar加到Build Path裡:

錯誤消失:

aspectjrt.jar:The runtime needed to execute a program using AspectJ. 基于AspectJ庫的應用運作時必須的運作庫。

下載下傳位址:

https://mvnrepository.com/artifact/org.aspectj/aspectjrt/1.6.9

aspectjweaver.jar: The AspectJ weaver introduces advices to java classes,給Java類引入對advices的支援

https://mvnrepository.com/artifact/org.aspectj/aspectjweaver

aopalliance.jar: The AOP Alliance aims to ensure interoperability between Java/J2EE AOP implementations to build a larger AOP community.

https://sourceforge.net/projects/aopalliance/