为什么在制作Spring项目时我没有接触到weaver警告? [英] Why do I get a not exposed to the weaver warnings when making my Spring project?

查看:104
本文介绍了为什么在制作Spring项目时我没有接触到weaver警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我制作Spring项目时,我似乎得到了一堆这样的警告。该项目使用编译时编织和各种Spring注释,如Transactional,Autowired和Configurable。

I seem to get a bunch of warnings like this when I make my Spring project. The project uses Compile Time Weaving and various Spring annotations like Transactional, Autowired, and Configurable.

我有三个问题:它们是什么(影响是什么)?我应该关注他们吗?和我该怎么做才能删除它们?

I have three questions: What are they (What's the effect)? Should I be concerned about them? and "What can I do to remove them?"

ajc: this affected type is not exposed to the weaver: com.myapp.domain.UserEntity [Xlint:typeNotExposedToWeaver]

让我知道你需要帮助我解决这个问题。我可以发布POM文件的相关部分,部分Java Spring配置文件或其他任何内容。我真的不知道需要什么,所以请告诉我。

Let me know what you need to help me solve this issue. I can post relevant parts of the POM file, parts of my Java Spring Configuration files, or whatever. I dont' really know what is required so let me know.

我在春季论坛上看到了它,但那个地方是一个鬼城。有几个人问过这个问题,但没有答案。

I saw it on the spring forum but that place is a ghost town. Several people have asked this question but there are no answers.

我正在使用Spring和CTW的Java配置。

I am using Java Configuration for Spring and CTW.

推荐答案


它们是什么(有什么影响)?

What are they (What's the effect)?

它( ajc )说它找到了一些它认为应该是或者已经编织的类,但是这不能完成/没有'已经完成了。

It (ajc) is saying that it has found some class that it thinks ought to be or to have been "woven", but that can't be done / hasn't been done.


我应该关注它们吗?

Should I be concerned about them?

是的。这意味着AspectJ编译时编织不会发生;即某些类的注释不会生效。

Yes. It would mean that the AspectJ compile time weaving won't happen properly; i.e. the annotations on some classes won't take effect.


我该怎么做才能删除它们?

What can I do to remove them?

更改构建配置,以便编织者可以找到编织所需的所有代码。

Change your build configs so that the weaver can find all of the code it needs to weave.

I我猜你的应用程序涉及多个Maven模块。如果是这样,那么这个答案有一些指向相关Eclipse / AspectJ和Maven文档的链接: https://stackoverflow.com/a/13120709 / 139985 。似乎需要明确告诉AspectJ Maven插件在哪里寻找东西。

I'm guessing that your application involves multiple Maven modules. If so, then this Answer has some links to the relevant Eclipse/AspectJ and Maven documentation: https://stackoverflow.com/a/13120709/139985. It seems that the AspectJ Maven plugin needs to be explicitly told where to look for stuff.

这篇关于为什么在制作Spring项目时我没有接触到weaver警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆