在构建项目时有没有办法摆脱这些spring/aspectj警告?

ege*_*ari 5 aop spring warnings aspectj build

我经常忍受这个很长一段时间,但我有点担心它现在正在减慢我的构建过程.当Spring/AspectJ报告这些警告时,有几秒钟被占用.我宁愿尝试使最干净的构建成为可能,即使它最终没有加速它.

以下是警告:

Found @DeclareAnnotation while current release does not support it (see 'org.aspectj.weaver.bcel.AtAjAttributes')
advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch]
advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
Run Code Online (Sandbox Code Playgroud)

我敢肯定,如果你使用过春天,你已经看过了这些.有什么方法可以摆脱它们吗?

des*_*pot 2

如果您看到此处,则 readAj5ClassAttributes 方法会抛出此异常。您正在使用当前版本不支持的某种注释。如果您检查该方法,您将看到仅当该类不是“org.aspectj.lang.annotation”且具有“Lorg/aspectj/lang/annotation/DeclareAnnotation;”时才会引发此异常。或@DeclareAnnotation 某处

因此,要么不要使用此注释,要么检查 jar 的版本,因为它说:

虽然当前版本不支持它

。一个好的起点是遍历这些: http://www.jarfinder.com/index.php/java/info/org.aspectj.weaver.bcel.AtAjAttributes
http://www.jarvana.com/jarvana/search ?search_type=class&java_class=org.aspectj.weaver.bcel.AtAjAttributes

亲切的问候,
暴君