关于because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified报错的解决方案(代码
Posted longronglang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了关于because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified报错的解决方案(代码相关的知识,希望对你有一定的参考价值。
我是采用代理模式的aspectj
<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>
代码运行报错如下:
解决方案:
1、需要在 resources 中配置 aop.xml 文件,放置在 META-INF 目录中( resource/META-INF/aop.xml),如没有自行创建
2、aop.xml 文件中的配置非常容易理解,只需要配置 Aspects 和需要被织入的类即可。
aop.xml
<?xml version="1.0" encoding="UTF-8" ?> <aspectj> <weaver options="-Xset:weaveJavaxPackages=true -Xlint:ignore -verbose"> </weaver> </aspectj>
再次运行解决问题,不会在报错了
以上是关于关于because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified报错的解决方案(代码的主要内容,如果未能解决你的问题,请参考以下文章
Django 报错 Refused to display 'http://127.0.0.1:8000/ in a frame because it set 'X-Frame-Opti
Django 报错 Refused to display 'http://127.0.0.1:8000/ in a frame because it set 'X-Frame-Opti
ContentProvider Cannot perform this operation because the connection pool has been closed 细节讲解配上详细图解
The resource could not be loaded because the App Transport
Python Falling back to the 'python' engine because the 'c' engine does not support r
Flinkflink 状态恢复 because the operator is not available in the new program