I’m AspectJ in proxy mode
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.10</version>
<configuration>
<argLine>
-javaagent:/Users/hongjie/.m2/repository/org/aspectj/aspectjweaver/1.8.13/aspectjweaver-1.8.13.jar
</argLine>
<useSystemClassLoader>true</useSystemClassLoader>
<forkMode>always</forkMode>
</configuration>
</plugin>
The code error is as follows:
Solution:
1. You need to configure the aop.xml file in resources and place it in the meta-inf directory (resource/meta-inf/AOP. XML). If you don’t create it by yourself
2. The configuration in aop.xml file is very easy to understand. You only need to configure aspects and the classes to be woven
aop.xml
<?xml version="1.0" encoding="UTF-8" ?>
<aspectj>
<weaver options="-Xset:weaveJavaxPackages=true -Xlint:ignore -verbose">
</weaver>
</aspectj>
Run again to solve the problem, no error will be reported
Similar Posts:
- [Solved] Spring Start Error: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project gulimall-coupon: There are test failures. Please refer to D:\m1\0613\mall-coup
- Maven Package Error: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project Mybatis: There are test failures.
- Maven warnning: ‘build.plugins.plugin.version’ is missing [How to Solve]
- [Solved] SpringBoot Package Error: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-res
- How to Solve Error: spring-boot-maven-plugin not found
- [Solved] Spring Boot Package Error: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0
- [Solved] Plugin ‘org.springframework.boot:spring-boot-maven-plugin:’not found
- No main manifest attribute when running Java – jar
- Springboot 2.4 package error, missing web.xml
- [Solved] Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)