Spring----> AOP Test A exception that occurs when MAVEN dependencies/tests are required

Source: Internet
Author: User
Tags aop

1   <Properties>2         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>3         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>4         <!--Spring Version number -5         <spring.version>4.2.4.RELEASE</spring.version>6     </Properties>7 <Dependencies>8               <!--Add Spring Core dependencies -9         <Dependency>Ten             <groupId>Org.springframework</groupId> One             <Artifactid>Spring-core</Artifactid> A             <version>${spring.version}</version> -         </Dependency> -         <Dependency> the             <groupId>Org.springframework</groupId> -             <Artifactid>Spring-context</Artifactid> -             <version>${spring.version}</version> -         </Dependency> +         <Dependency> -             <groupId>Org.springframework</groupId> +             <Artifactid>Spring-context-support</Artifactid> A             <version>${spring.version}</version> at         </Dependency>  -         <Dependency> -             <groupId>Org.springframework</groupId> -             <Artifactid>SPRING-AOP</Artifactid> -             <version>${spring.version}</version> -         </Dependency> in          -         <Dependency> to             <groupId>Org.springframework</groupId> +             <Artifactid>spring-aspects</Artifactid> -             <version>${spring.version}</version> the         </Dependency> *     </Dependencies>

After the introduction of dependency maven dependencies is as follows:

After introducing spring-aspects dependency, the aspectjweaver-1.8.7 jar package is introduced automatically.

The following exception occur during an AOP test :

Java.lang.noclassdeffounderror:org/aspectj/weaver/reflect/reflectionworld$reflectionworldexception

Reason:

There is no dependency or aspectjweaver dependency that introduces spring-aspects. (Spring-aspects integrates with ASPECTJ, can introduce any of the one by one dependencies)

Spring----> AOP Test A exception that occurs when MAVEN dependencies/tests are required

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.