在构建项目时有什么方法可以摆脱这些 spring/aspectj 警告吗?

发布于 2024-10-06 15:38:15 字数 844 浏览 1 评论 0原文

我经常忍受这种情况很长一段时间,但我有点担心它现在会减慢我的构建过程。 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]

我确信如果您使用过 spring,您已经看到过这些。有什么办法可以摆脱它们吗?

I've frequently put up with this for a long time, but I'm a little worried that it's slowing my build process down now. There are a good few seconds that are taken up as Spring/AspectJ reports these warnings. I'd rather try and make the cleanest build possible, even if it doesn't end up speeding it up.

Here are the warnings:

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]

I'm sure if you've used spring, you've seen these. Any way to get rid of them?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

请爱~陌生人 2024-10-13 15:38:15

If you see here, the readAj5ClassAttributes method throws this exception. It looks like you are using some kind of annotation that your current version doesn't support. If you inspect the method, you will see that this exception is thrown only when the class is not "org.aspectj.lang.annotation" and when you have "Lorg/aspectj/lang/annotation/DeclareAnnotation;" or @DeclareAnnotation somewhere.

So either don't use this annotation or check to see the versions of the jar since it says:

while current release does not support
it

. A good place to start is by traversing these:
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

Kind Regards,
Despot

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文